-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcodemagic.yaml
More file actions
43 lines (43 loc) · 1.39 KB
/
codemagic.yaml
File metadata and controls
43 lines (43 loc) · 1.39 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
workflows:
macos-release:
name: macOS Release
instance_type: mac_mini_m2
max_build_duration: 60
environment:
node: 22
groups:
- cloudflare
# Optional: add a Codemagic group that provides
# CSC_LINK, CSC_KEY_PASSWORD, APPLE_ID,
# APPLE_APP_SPECIFIC_PASSWORD, and APPLE_TEAM_ID
# when you are ready to ship signed/notarized mac builds.
# - apple-signing
triggering:
events:
- tag
tag_patterns:
- pattern: 'v*'
include: true
scripts:
- name: Install pnpm
script: npm install -g pnpm@9
- name: Install dependencies
script: pnpm install --frozen-lockfile
- name: Build
script: pnpm run build
- name: Package
script: pnpm exec electron-builder --mac --config.npmRebuild=false
- name: Upload to R2
script: |
npm install -g wrangler
export CLOUDFLARE_API_TOKEN=$CLOUDFLARE_API_TOKEN
export CLOUDFLARE_ACCOUNT_ID=$CLOUDFLARE_ACCOUNT_ID
for f in release/*/DAEMON-*-arm64.dmg release/*/DAEMON-*-arm64.zip release/*/latest-mac.yml; do
if [ -f "$f" ]; then
wrangler r2 object put "daemon-releases/$(basename $f)" --file "$f" --remote
fi
done
artifacts:
- release/*/DAEMON-*.dmg
- release/*/DAEMON-*.zip
- release/*/latest-mac.yml