-
Notifications
You must be signed in to change notification settings - Fork 622
74 lines (63 loc) · 2.16 KB
/
macos-aarch64.yaml
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
name: macOS aarch64 Build
on:
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
macos-aarch64:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: macos-latest
- name: install the missing rust target
run: |
rustup target add aarch64-apple-darwin
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "20"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Pnpm install and check
run: |
pnpm i
pnpm check --arch arm64 --sidecar-host aarch64-apple-darwin
- name: Tauri build (cmd)
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
run: |
pnpm build --target aarch64-apple-darwin
mv "./src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Clash Nyanpasu.app" "./src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Clash Nyanpasu.aarch64.app"
mv "./src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Clash Nyanpasu.app.tar.gz" "./src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Clash Nyanpasu.aarch64.app.tar.gz"
macos-aarch64-upload:
needs: macos-aarch64
strategy:
matrix:
paths:
[
macos/Clash Nyanpasu.aarch64.app,
macos/Clash Nyanpasu.aarch64.app.tar.gz,
dmg/Clash Nyanpasu_1.4.0_aarch64.dmg,
]
runs-on: ubuntu-latest
steps:
- name: Upload binaries to release (${{ matrix.paths }})
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: src-tauri/target/aarch64-apple-darwin/release/bundle/${{ matrix.paths }}
tag: dev
prerelease: true