-
Notifications
You must be signed in to change notification settings - Fork 31
42 lines (40 loc) · 1.48 KB
/
macos-m1-build-sign.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: macos-m1-build-sign
on: workflow_dispatch
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '21'
- name: Decode and import certificate
env:
MACOS_BASE64: ${{ secrets.MACOS_BASE64 }}
MACOS_PASSWORD: ${{ secrets.MACOS_PASSWORD }}
run: |
echo "$MACOS_BASE64" | base64 --decode > certificate.p12
security create-keychain -p actions temp.keychain
security import certificate.p12 -k temp.keychain -P "$MACOS_PASSWORD" -T /usr/bin/codesign
security list-keychains -d user -s temp.keychain
security unlock-keychain -p actions temp.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k actions temp.keychain
- name: build app
run: |
cd gui
yarn install
NODE_OPTIONS="--max-old-space-size=4096" yarn build:apps
yarn build-ztm-macos
NODE_OPTIONS="--max-old-space-size=4096" yarn build:base
- name: sign
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: |
cd gui
src-ios/sign.sh src-tauri/target/release/bundle/dmg/ztm_${{ vars.APP_VERSION }}_aarch64.dmg $APPLE_ID $APPLE_PASSWORD
timeout-minutes: 120
- uses: actions/upload-artifact@v3
with:
name: release
path: ./gui/src-tauri/target/release/bundle/dmg/ztm_${{ vars.APP_VERSION }}_aarch64_signed.dmg