forked from josephdadams/spotify-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.24 KB
/
build-mac-app.yml
File metadata and controls
43 lines (36 loc) · 1.24 KB
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
43
# Build macOS .app and upload as artifact (no signing).
# Download from the Actions run summary after it completes.
name: Build Mac app
on:
push:
branches: [main]
workflow_dispatch: # Allow "Run workflow" from the Actions tab
jobs:
build:
name: Build spotify-controller.app
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build macOS app (unpacked)
run: npm run build:mac
- name: Zip app for artifact
run: |
cd dist
# electron-builder --mac --dir outputs mac-arm64 on ARM (macos-latest) or mac on x64
dir=$(ls -d mac* 2>/dev/null | head -1)
if [ -z "$dir" ]; then echo "No mac* dir in dist"; exit 1; fi
# Zip contents so spotify-controller.app is at root of archive (no mac-arm64/ prefix)
(cd "$dir" && zip -r ../spotify-controller-mac.zip .)
- name: Upload app artifact
uses: actions/upload-artifact@v4
with:
name: spotify-controller-mac
path: dist/spotify-controller-mac.zip