ci: add macOS arm64 workflow
This commit is contained in:
parent
2c449514be
commit
60b6ff3fe9
51
.gitea/workflows/electron-macos-arm64.yml
Normal file
51
.gitea/workflows/electron-macos-arm64.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: electron-macos-arm64
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
tags: [ 'v*' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
electron-macos-arm64:
|
||||||
|
runs-on: macos-arm64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
- name: Build macOS app bundle (arm64)
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
npx electron-builder --mac zip --arm64 --publish never
|
||||||
|
|
||||||
|
- name: Pack artifacts
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
rm -rf artifacts
|
||||||
|
mkdir -p artifacts
|
||||||
|
found=0
|
||||||
|
for f in dist/*.zip dist/*.dmg; do
|
||||||
|
if [ -f "$f" ]; then
|
||||||
|
cp "$f" "artifacts/"
|
||||||
|
found=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ "$found" -eq 1 ] || { echo "No macOS artifacts produced in dist/"; exit 1; }
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: electron_tray_demo-macos-arm64-run${{ github.run_number }}
|
||||||
|
path: artifacts/
|
||||||
|
retention-days: 14
|
||||||
Loading…
x
Reference in New Issue
Block a user