mirror of
https://github.com/Eugeny/tabby
synced 2024-12-14 23:32:41 +00:00
99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
name: macOS Build
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
runs-on: macos-11.0
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: x86_64
|
|
- arch: arm64
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.3.4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Installing Node
|
|
uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: 14
|
|
|
|
- name: Install deps
|
|
run: |
|
|
sudo npm i -g yarn@1.22.1
|
|
cd app
|
|
yarn
|
|
cd ..
|
|
rm app/node_modules/.yarn-integrity
|
|
yarn
|
|
|
|
- name: Build native deps
|
|
run: scripts/build-native.js
|
|
env:
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
- name: Build native deps
|
|
run: |
|
|
rm -rf app/node_modules/cpu-features
|
|
rm -rf app/node_modules/ssh2/crypto/build
|
|
if: ${{ matrix.arch == 'arm64' }}
|
|
|
|
- name: Webpack
|
|
run: yarn run build
|
|
|
|
- name: Prepackage plugins
|
|
run: scripts/prepackage-plugins.js
|
|
env:
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
- 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/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
|
|
env:
|
|
ARCH: ${{matrix.arch}}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
|
APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }}
|
|
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}
|
|
USE_HARD_LINKS: false
|
|
# DEBUG: electron-builder,electron-builder:*
|
|
|
|
- name: Build packages without signing
|
|
run: scripts/build-macos.js
|
|
if: "! (github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')))"
|
|
env:
|
|
ARCH: ${{matrix.arch}}
|
|
# DEBUG: electron-builder,electron-builder:*
|
|
|
|
- name: Upload symbols
|
|
run: |
|
|
sudo npm install -g @sentry/cli --unsafe-perm
|
|
./scripts/sentry-upload.js
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
|
|
- name: Package artifacts
|
|
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 (${{matrix.arch}})
|
|
path: artifact-pkg
|
|
|
|
- uses: actions/upload-artifact@master
|
|
name: Upload ZIP
|
|
with:
|
|
name: macOS .zip (${{matrix.arch}})
|
|
path: artifact-zip
|