-
Notifications
You must be signed in to change notification settings - Fork 148
82 lines (68 loc) · 2.63 KB
/
macos-nightly.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: MacOS (x86_64/arm) Nightly Build
on:
push:
branches:
- pr-29
workflow_dispatch: # Allows manual triggering
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build MacOS Apps
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Dependencies
run: |
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
npm install
- name: Set up keychain
run: |
security create-keychain -p "" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "" build.keychain
security import <(echo "$MACOS_CERTIFICATE" | base64 --decode) -k build.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
- name: Build Frontend
run: npm run build
- name: Build for Intel Mac
run: |
echo "Building for x86_64..."
npm run tauri build -- --target x86_64-apple-darwin --bundles dmg
- name: Build for Apple Silicon
run: |
echo "Building for aarch64..."
npm run tauri build -- --target aarch64-apple-darwin --bundles dmg
- name: Upload Intel Build
uses: actions/upload-artifact@v4
with:
name: macos-intel-build
path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload Apple Silicon Build
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-build
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
- name: Create Release
if: github.event_name == 'schedule' # Only create release for scheduled builds
uses: softprops/action-gh-release@v1
with:
name: Nightly Build ${{ github.sha }}
tag_name: nightly-${{ github.sha }}
files: |
src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}