From ee1d465bf606aaa11462fd753cce31a1f94c2afd Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 7 May 2020 13:00:42 +0200 Subject: [PATCH] Revert "separate mac builds" This reverts commit 90cc06c3fd358a8e7efe5d96cc700a651b5f1653. --- .github/workflows/macos-zip.yml | 64 --------------------------------- .github/workflows/macos.yml | 12 ++++++- scripts/build-macos-zip.js | 17 --------- scripts/build-macos.js | 2 +- 4 files changed, 12 insertions(+), 83 deletions(-) delete mode 100644 .github/workflows/macos-zip.yml delete mode 100755 scripts/build-macos-zip.js diff --git a/.github/workflows/macos-zip.yml b/.github/workflows/macos-zip.yml deleted file mode 100644 index b5668c19..00000000 --- a/.github/workflows/macos-zip.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: macOS Build -on: [push, pull_request] -jobs: - build: - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Installing Node - uses: actions/setup-node@v1 - with: - node-version: 10 - - - name: Install deps - run: | - sudo npm i -g yarn@1.19.1 - cd app - yarn - cd .. - rm app/node_modules/.yarn-integrity - yarn - - - name: Build native deps - run: scripts/build-native.js - - - name: Webpack - run: yarn run build - - - name: Prepackage plugins - run: scripts/prepackage-plugins.js - - # Prevent permission corruption caused by electron-builder - # This is the reason there's a separate workflow for the ZIP build - - run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js - - - name: Build and sign packages - run: scripts/build-macos-zip.js - if: github.repository == 'Eugeny/terminus' && github.event_name == 'push' - env: - #DEBUG: electron-builder,electron-builder:* - GH_TOKEN: ${{ secrets.GH_TOKEN }} - CSC_LINK: ${{ secrets.CSC_LINK }} - CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }} - APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }} - - - name: Build packages without signing - run: scripts/build-macos.js - if: github.repository != 'Eugeny/terminus' || github.event_name != 'push' - env: - DEBUG: electron-builder,electron-builder:* - - - name: Package artifacts - run: | - mkdir artifact-zip - mv dist/*.zip artifact-zip/ - - - uses: actions/upload-artifact@master - name: Upload ZIP - with: - name: macOS .zip - path: artifact-zip diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 701dd6cf..fd3c07f4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,7 +2,7 @@ name: macOS Build on: [push, pull_request] jobs: build: - runs-on: macos-latest + runs-on: macOS-latest steps: - name: Checkout @@ -31,6 +31,8 @@ jobs: - name: Prepackage plugins run: scripts/prepackage-plugins.js + - run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js + - name: Build and sign packages run: scripts/build-macos.js if: github.repository == 'Eugeny/terminus' && github.event_name == 'push' @@ -52,9 +54,17 @@ jobs: run: | mkdir artifact-pkg mv dist/*.pkg artifact-pkg/ + mkdir artifact-zip + mv dist/*.zip artifact-zip/ - uses: actions/upload-artifact@master name: Upload PKG with: name: macOS .pkg path: artifact-pkg + + - uses: actions/upload-artifact@master + name: Upload ZIP + with: + name: macOS .zip + path: artifact-zip diff --git a/scripts/build-macos-zip.js b/scripts/build-macos-zip.js deleted file mode 100755 index 38830932..00000000 --- a/scripts/build-macos-zip.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node -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, - mac: ['zip'], - config: { - extraMetadata: { - version: vars.version, - }, - }, - publish: isTag ? 'always' : 'onTag', -}).catch(() => process.exit(1)) diff --git a/scripts/build-macos.js b/scripts/build-macos.js index c8688889..ecc08471 100755 --- a/scripts/build-macos.js +++ b/scripts/build-macos.js @@ -7,7 +7,7 @@ const isCI = !!process.env.GITHUB_REF builder({ dir: true, - mac: ['pkg'], + mac: ['pkg', 'zip'], config: { extraMetadata: { version: vars.version,