2019-08-15 12:53:17 +03:00
|
|
|
name: macOS Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-12-24 18:21:38 +03:00
|
|
|
runs-on: macos-11.0
|
2020-12-24 16:03:14 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- arch: x86_64
|
|
|
|
- arch: arm64
|
2019-08-15 12:53:17 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-05-15 20:20:18 +03:00
|
|
|
uses: actions/checkout@v2.3.4
|
2019-08-15 12:53:17 +03:00
|
|
|
|
|
|
|
- name: Installing Node
|
2021-05-12 11:31:08 +03:00
|
|
|
uses: actions/setup-node@v2.1.5
|
2019-08-15 12:53:17 +03:00
|
|
|
with:
|
2020-12-23 23:45:47 +03:00
|
|
|
node-version: 15
|
2019-08-15 12:53:17 +03:00
|
|
|
|
2019-09-09 17:38:29 +03:00
|
|
|
- name: Install deps
|
2019-08-26 23:14:10 +03:00
|
|
|
run: |
|
2020-12-23 23:45:47 +03:00
|
|
|
sudo npm i -g yarn@1.22.1
|
2019-08-26 23:14:10 +03:00
|
|
|
cd app
|
|
|
|
yarn
|
|
|
|
cd ..
|
|
|
|
rm app/node_modules/.yarn-integrity
|
|
|
|
yarn
|
2021-01-27 02:26:48 +03:00
|
|
|
./node_modules/.bin/patch-package
|
|
|
|
cd app
|
|
|
|
../node_modules/.bin/patch-package
|
|
|
|
cd ..
|
2021-01-12 19:59:13 +03:00
|
|
|
|
2019-09-09 17:38:29 +03:00
|
|
|
- name: Build native deps
|
|
|
|
run: scripts/build-native.js
|
2020-12-24 16:03:14 +03:00
|
|
|
env:
|
2020-12-24 18:16:13 +03:00
|
|
|
ARCH: ${{matrix.arch}}
|
2019-09-09 17:38:29 +03:00
|
|
|
|
|
|
|
- name: Webpack
|
|
|
|
run: yarn run build
|
|
|
|
|
|
|
|
- name: Prepackage plugins
|
|
|
|
run: scripts/prepackage-plugins.js
|
2020-12-24 16:03:14 +03:00
|
|
|
env:
|
2020-12-24 18:16:13 +03:00
|
|
|
ARCH: ${{matrix.arch}}
|
2019-09-09 17:38:29 +03:00
|
|
|
|
2020-05-07 14:00:42 +03:00
|
|
|
- run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js
|
|
|
|
|
2019-09-20 12:21:39 +03:00
|
|
|
- name: Build and sign packages
|
2019-09-09 17:38:29 +03:00
|
|
|
run: scripts/build-macos.js
|
2019-09-20 12:28:04 +03:00
|
|
|
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
2019-08-15 13:41:22 +03:00
|
|
|
env:
|
2020-12-24 18:16:13 +03:00
|
|
|
ARCH: ${{matrix.arch}}
|
2019-08-15 13:41:22 +03:00
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
2020-05-04 15:48:46 +03:00
|
|
|
APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }}
|
|
|
|
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}
|
2021-01-02 12:20:44 +03:00
|
|
|
USE_HARD_LINKS: false
|
2020-12-24 16:03:14 +03:00
|
|
|
# DEBUG: electron-builder,electron-builder:*
|
2019-08-15 14:13:35 +03:00
|
|
|
|
2019-09-20 12:21:39 +03:00
|
|
|
- name: Build packages without signing
|
|
|
|
run: scripts/build-macos.js
|
2019-09-20 12:28:04 +03:00
|
|
|
if: github.repository != 'Eugeny/terminus' || github.event_name != 'push'
|
2019-09-20 12:21:39 +03:00
|
|
|
env:
|
2020-12-24 18:16:13 +03:00
|
|
|
ARCH: ${{matrix.arch}}
|
2020-12-24 16:03:14 +03:00
|
|
|
# DEBUG: electron-builder,electron-builder:*
|
2019-09-20 12:21:39 +03:00
|
|
|
|
2021-01-04 21:11:57 +03:00
|
|
|
- name: Upload symbols
|
|
|
|
run: |
|
|
|
|
sudo npm install -g @sentry/cli --unsafe-perm
|
2021-01-04 22:44:24 +03:00
|
|
|
./scripts/sentry-upload.js
|
2021-01-04 22:02:47 +03:00
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
2021-01-04 21:11:57 +03:00
|
|
|
|
2019-08-15 14:13:35 +03:00
|
|
|
- name: Package artifacts
|
|
|
|
run: |
|
2019-08-15 15:56:03 +03:00
|
|
|
mkdir artifact-pkg
|
|
|
|
mv dist/*.pkg artifact-pkg/
|
2020-05-07 14:00:42 +03:00
|
|
|
mkdir artifact-zip
|
|
|
|
mv dist/*.zip artifact-zip/
|
2019-08-15 14:13:35 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
2019-08-15 15:59:07 +03:00
|
|
|
name: Upload PKG
|
2019-08-15 14:13:35 +03:00
|
|
|
with:
|
2020-12-24 18:16:13 +03:00
|
|
|
name: macOS .pkg (${{matrix.arch}})
|
2019-08-15 15:56:03 +03:00
|
|
|
path: artifact-pkg
|
2020-05-07 14:00:42 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload ZIP
|
|
|
|
with:
|
2020-12-24 18:16:13 +03:00
|
|
|
name: macOS .zip (${{matrix.arch}})
|
2020-05-07 14:00:42 +03:00
|
|
|
path: artifact-zip
|