From 927ca57e5634b965a27bd243070a130c437636de Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Mon, 26 Aug 2019 22:38:13 +0200 Subject: [PATCH] ci --- .github/workflows/linux.yml | 8 +++--- .github/workflows/windows.yml | 51 +++++++++++++++++++++++++++++++++++ scripts/build-linux.js | 2 +- scripts/build-windows.js | 2 +- 4 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8c720f91..66c2f1ee 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -33,13 +33,13 @@ jobs: - name: Package artifacts run: | mkdir artifact-deb - mv dist/*.pkg artifact-deb/ + mv dist/*.deb artifact-deb/ mkdir artifact-rpm - mv dist/*.zip artifact-rpm/ + mv dist/*.rpm artifact-rpm/ mkdir artifact-snap - mv dist/*.zip artifact-snap/ + mv dist/*.snap artifact-snap/ mkdir artifact-tar.gz - mv dist/*.zip artifact-tar.gz/ + mv dist/*.tar.gz artifact-tar.gz/ - uses: actions/upload-artifact@master name: Upload DEB diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..24844166 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,51 @@ +name: Windows Build +on: [push, pull_request] +jobs: + build: + runs-on: windows-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-windows.js + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BT_TOKEN: ${{ secrets.BT_TOKEN }} + WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} + + - 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/scripts/build-linux.js b/scripts/build-linux.js index 6b87f915..eb6fb740 100755 --- a/scripts/build-linux.js +++ b/scripts/build-linux.js @@ -2,7 +2,7 @@ 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/') builder({ dir: true, diff --git a/scripts/build-windows.js b/scripts/build-windows.js index df741477..eb6ab2fb 100755 --- a/scripts/build-windows.js +++ b/scripts/build-windows.js @@ -2,7 +2,7 @@ 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/') builder({ dir: true,