Skip to content

macos-m1-build-sign

macos-m1-build-sign #9

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