diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..e93d7e30 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,25 @@ +name: Docs +on: push +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Installing Node + uses: actions/setup-node@v1 + with: + version: 10 + + - name: Build + run: | + eval $(ssh-agent -s) + ssh-add <(echo "$DOCS_PRIVATE_KEY") + yarn + yarn run docs + rsync -e "ssh -o StrictHostKeyChecking=no" -arv docs/api/ root@ajenti.org:/srv/terminus-docs/ + + env: + DOCS_PRIVATE_KEY: ${{ secrets.DOCS_PRIVATE_KEY }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..66c2f1ee --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,66 @@ +name: Linux Build +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Installing Node + uses: actions/setup-node@v1 + with: + version: 10 + + - name: Build + run: | + cd app + yarn + cd .. + rm app/node_modules/.yarn-integrity + yarn + yarn run lint + scripts/build-native.js + yarn run build:typings + yarn run build + scripts/prepackage-plugins.js + scripts/build-linux.js + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BT_TOKEN: ${{ secrets.BT_TOKEN }} + + - name: Package artifacts + run: | + mkdir artifact-deb + mv dist/*.deb artifact-deb/ + mkdir artifact-rpm + mv dist/*.rpm artifact-rpm/ + mkdir artifact-snap + mv dist/*.snap artifact-snap/ + mkdir artifact-tar.gz + mv dist/*.tar.gz artifact-tar.gz/ + + - uses: actions/upload-artifact@master + name: Upload DEB + with: + name: Linux .deb + path: artifact-deb + + - uses: actions/upload-artifact@master + name: Upload RPM + with: + name: Linux .rpm + path: artifact-rpm + + - uses: actions/upload-artifact@master + name: Upload Snap + with: + name: Linux .snap + path: artifact-snap + + - uses: actions/upload-artifact@master + name: Upload tarball + with: + name: Linux tarball + path: artifact-tar.gz diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a341b3f0..4d442e5b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,7 +14,18 @@ jobs: version: 10 - name: Build - run: build/travis.sh + run: | + cd app + yarn + cd .. + rm app/node_modules/.yarn-integrity + yarn + yarn run lint + scripts/build-native.js + yarn run build:typings + yarn run build + scripts/prepackage-plugins.js + scripts/build-macos.js env: GH_TOKEN: ${{ secrets.GH_TOKEN }} BT_TOKEN: ${{ secrets.BT_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..0b2cf2a3 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,52 @@ +name: Windows Build +on: [push, pull_request] +jobs: + build: + runs-on: windows-2016 + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Installing Node + uses: actions/setup-node@v1 + with: + version: 10 + + - name: Build + shell: powershell + run: | + cd app + yarn + cd .. + del app/node_modules/.yarn-integrity + yarn + node scripts/build-native.js + yarn run build:typings + yarn run build + node scripts/prepackage-plugins.js + node scripts/build-windows.js + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BT_TOKEN: ${{ secrets.BT_TOKEN }} + WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} + WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} + + - name: Package artifacts + run: | + mkdir artifact-setup + mv dist/*-setup.exe artifact-setup/ + mkdir artifact-portable + mv dist/*-portable.exe artifact-portable/ + + - uses: actions/upload-artifact@master + name: Upload installer + with: + name: Installer + path: artifact-setup + + - uses: actions/upload-artifact@master + name: Upload portable build + with: + name: Portable build + path: artifact-portable diff --git a/.travis.ssh.key.enc b/.travis.ssh.key.enc deleted file mode 100644 index 5f07ddbf..00000000 Binary files a/.travis.ssh.key.enc and /dev/null differ diff --git a/.travis.ssh.key.pub b/.travis.ssh.key.pub deleted file mode 100644 index e534803e..00000000 --- a/.travis.ssh.key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDDFM4nHSbET5V7EYNgjA8NeVfOxV0wVMdZ2YvsDzD+qPJ4+MYbvsL7ZPaSxQSn7n6ATkLHjKje5RpF/Rl9K3kucGs0P6cqJVeE0qryEteQ3Q+fYAk+bD2J9ZQ/hv/0NtLl8T+7lJUZ3WUxFH73sgph77Sw0z+kMpPaK7U2vqMBQD/7+6iJgya31wP0qW0XKDz1BjKeXgwTg10Pm4vcGsR4c2q7YIzSzBHffcyo0vJyFvOX/ZKHlZRcq/wnQMeOl/hPgf1xCENjQZmFVReQlYSw5cNNDT9HZPKekOAZFFez7/AbPiTIo/bnBYIv0mdUjr3nw8nXF505q8LiD3z/ksaaWDqe9CCLM4W0Bh7/dhP7IGPdfX0fVHLhOnYIOsG21D8rWJjMPkVRSLyEvWNAnVuObJNHoQu8VATnOxfPNnMun72IHyyFWVoADk5JcsMbzcP7gZB+5oJO7U1qpcdndtBOA3ZlF0Uz2jVZnqavoEBWT39tl3vs69hAA3aTPGclg7HMuAJOl4HsKmaUgDxqV2wCX/S4pDqmKMbmumDLX+MM0xl0gXj/zpVJp9BzdnrArkC40ivmC6TSA4wrdN0tNBlqApkH5/jxGWrcu2AXVn9PGF3+QrjW0iu+QMZCaKWDhLIQC835uFwzhnNGlx41B7uxMLuNFxKXdQ3f/cC9QMG8ew== TravisCIDeployKey diff --git a/README.md b/README.md index 0fc38993..37c3ba8f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@
diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ebd1bfe4..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,210 +0,0 @@ -trigger: - tags: - include: - - v* - branches: - include: - - master - -variables: -- group: Vars - -jobs: -# - job: Windows -# pool: -# vmImage: 'vs2017-win2016' - -# steps: -# - task: NodeTool@0 -# inputs: -# versionSpec: '10.x' -# displayName: 'Install Node.js' - -# - script: yarn --network-timeout 100000 -# displayName: 'Install dependencies' - -# - script: node scripts/build-native.js -# displayName: 'Rebuild native dependencies' - -# - script: yarn run build -# displayName: 'Build' - -# - script: node scripts/prepackage-plugins.js -# displayName: 'Prepackage plugins' - -# - script: node scripts/build-windows.js -# displayName: 'Package' -# env: -# WIN_CSC_LINK: $(WIN_CSC_LINK) -# WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD) -# BT_TOKEN: $(BT_TOKEN) -# GH_TOKEN: $(GH_TOKEN) -# DEBUG: electron-builder - -# - task: CopyFiles@2 -# inputs: -# contents: 'dist\\*-setup.exe' -# targetFolder: $(Build.ArtifactStagingDirectory) -# flattenFolders: true -# cleanTargetFolder: true - -# - task: PublishBuildArtifacts@1 -# inputs: -# pathtoPublish: $(Build.ArtifactStagingDirectory) -# artifactName: Windows - Installer -# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - -# - task: CopyFiles@2 -# inputs: -# contents: 'dist\\*-portable.exe' -# targetFolder: $(Build.ArtifactStagingDirectory) -# flattenFolders: true -# cleanTargetFolder: true - -# - task: PublishBuildArtifacts@1 -# inputs: -# pathtoPublish: $(Build.ArtifactStagingDirectory) -# artifactName: Windows - Portable build -# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - -- job: Linux - pool: - vmImage: 'ubuntu-16.04' - - steps: - - task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - - - script: yarn - displayName: 'Install dependencies' - - - script: node scripts/build-native.js - displayName: 'Rebuild native dependencies' - - - script: yarn run build - displayName: 'Build' - - - script: yarn run lint - displayName: 'Lint' - - - script: node scripts/prepackage-plugins.js - displayName: 'Prepackage plugins' - - - script: node scripts/build-linux.js - displayName: 'Package' - env: - BT_TOKEN: $(BT_TOKEN) - GH_TOKEN: $(GH_TOKEN) - - - task: CopyFiles@2 - inputs: - contents: 'dist/*.deb' - targetFolder: $(Build.ArtifactStagingDirectory) - flattenFolders: true - cleanTargetFolder: true - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory) - artifactName: Linux - DEB - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - - - task: CopyFiles@2 - inputs: - contents: 'dist/*.rpm' - targetFolder: $(Build.ArtifactStagingDirectory) - flattenFolders: true - cleanTargetFolder: true - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory) - artifactName: Linux - RPM - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - - - task: CopyFiles@2 - inputs: - contents: 'dist/*.snap' - targetFolder: $(Build.ArtifactStagingDirectory) - flattenFolders: true - cleanTargetFolder: true - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory) - artifactName: Linux - Snap - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - - - task: CopyFiles@2 - inputs: - contents: 'dist/*.tar.gz' - targetFolder: $(Build.ArtifactStagingDirectory) - flattenFolders: true - cleanTargetFolder: true - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory) - artifactName: Linux - tar.gz - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - -# - job: macOS -# pool: -# vmImage: 'macOS-10.14' - -# steps: -# - task: NodeTool@0 -# inputs: -# versionSpec: '10.x' -# displayName: 'Install Node.js' - -# - script: yarn -# displayName: 'Install dependencies' - -# - script: node scripts/build-native.js -# displayName: 'Rebuild native dependencies' - -# - script: yarn run build -# displayName: 'Build' - -# - script: node scripts/prepackage-plugins.js -# displayName: 'Prepackage plugins' - -# - script: node scripts/build-macos.js -# displayName: 'Package' -# env: -# CSC_LINK: $(CSC_LINK) -# CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD) -# BT_TOKEN: $(BT_TOKEN) -# GH_TOKEN: $(GH_TOKEN) -# APPSTORE_USERNAME: $(APPSTORE_USERNAME) -# APPSTORE_PASSWORD: $(APPSTORE_PASSWORD) -# DEBUG: electron-builder - -# - task: CopyFiles@2 -# inputs: -# contents: 'dist/*.dmg' -# targetFolder: $(Build.ArtifactStagingDirectory) -# flattenFolders: true -# cleanTargetFolder: true - -# - task: PublishBuildArtifacts@1 -# inputs: -# pathtoPublish: $(Build.ArtifactStagingDirectory) -# artifactName: macOS - DMG -# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - -# - task: CopyFiles@2 -# inputs: -# contents: 'dist/*.zip' -# targetFolder: $(Build.ArtifactStagingDirectory) -# flattenFolders: true -# cleanTargetFolder: true - -# - task: PublishBuildArtifacts@1 -# inputs: -# pathtoPublish: $(Build.ArtifactStagingDirectory) -# artifactName: macOS - app.zip -# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') diff --git a/build/travis.sh b/build/travis.sh deleted file mode 100755 index ae5e23f2..00000000 --- a/build/travis.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e -cd app -yarn -cd .. -rm app/node_modules/.yarn-integrity -yarn -scripts/build-native.js -yarn run build:typings -yarn run build -scripts/prepackage-plugins.js -scripts/build-macos.js diff --git a/scripts/build-linux.js b/scripts/build-linux.js index 6b87f915..741794dd 100755 --- a/scripts/build-linux.js +++ b/scripts/build-linux.js @@ -2,7 +2,8 @@ const builder = require('electron-builder').build const vars = require('./vars') -const isTag = (process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/') +const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/') +const isCI = !!process.env.GITHUB_REF builder({ dir: true, diff --git a/scripts/build-macos.js b/scripts/build-macos.js index 6d96e032..ecc08471 100755 --- a/scripts/build-macos.js +++ b/scripts/build-macos.js @@ -3,6 +3,7 @@ const builder = require('electron-builder').build const vars = require('./vars') const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/') +const isCI = !!process.env.GITHUB_REF builder({ dir: true, diff --git a/scripts/build-windows.js b/scripts/build-windows.js index df741477..50065cd7 100755 --- a/scripts/build-windows.js +++ b/scripts/build-windows.js @@ -2,7 +2,8 @@ const builder = require('electron-builder').build const vars = require('./vars') -const isTag = (process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/') +const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/') +const isCI = !!process.env.GITHUB_REF builder({ dir: true, diff --git a/yarn.lock b/yarn.lock index df3a999c..e980f6d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2137,14 +2137,16 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: estraverse "^4.1.1" eslint-utils@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" - integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== eslint@^5.16.0: version "5.16.0"