2019-08-15 12:53:17 +03:00
|
|
|
name: macOS Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-05-07 14:00:42 +03:00
|
|
|
runs-on: macOS-latest
|
2019-08-15 12:53:17 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Installing Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
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
|
2019-09-09 17:38:29 +03:00
|
|
|
|
|
|
|
- name: Build native deps
|
|
|
|
run: scripts/build-native.js
|
|
|
|
|
|
|
|
- name: Webpack
|
|
|
|
run: yarn run build
|
|
|
|
|
|
|
|
- name: Prepackage plugins
|
|
|
|
run: scripts/prepackage-plugins.js
|
|
|
|
|
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-02-11 17:34:56 +03:00
|
|
|
#DEBUG: electron-builder,electron-builder:*
|
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 }}
|
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:
|
|
|
|
DEBUG: electron-builder,electron-builder:*
|
|
|
|
|
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:
|
2019-08-15 15:56:03 +03:00
|
|
|
name: macOS .pkg
|
|
|
|
path: artifact-pkg
|
2020-05-07 14:00:42 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload ZIP
|
|
|
|
with:
|
|
|
|
name: macOS .zip
|
|
|
|
path: artifact-zip
|