File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 - os : windows-latest
2020 label : windows-x64
2121 - os : macos-latest
22- label : macos-arm64
23- - os : macos-13
24- label : macos-x64
22+ label : macos-universal
2523 runs-on : ${{ matrix.os }}
2624 defaults :
2725 run :
3432 with :
3533 node-version : 22
3634
37- - name : 安装 Rust
35+ - name : 安装 Rust(macOS 附带 universal 双架构 target)
3836 uses : dtolnay/rust-toolchain@stable
37+ with :
38+ targets : x86_64-apple-darwin,aarch64-apple-darwin
3939
4040 - name : Rust 缓存
4141 uses : swatinem/rust-cache@v2
4848 - name : 安装前端依赖
4949 run : npm install --no-fund --no-audit
5050
51- - name : 构建(Windows 出 NSIS/MSI,macOS 出 App/Dmg)
52- run : npm run tauri build
51+ - name : 构建(Windows 出 NSIS/MSI,macOS 出 universal App/Dmg)
52+ run : |
53+ if [ "$RUNNER_OS" = "macOS" ]; then
54+ npm run tauri build -- --target universal-apple-darwin
55+ else
56+ npm run tauri build
57+ fi
5358
5459 - name : 上传安装包
5560 uses : actions/upload-artifact@v4
5964 desktop/src-tauri/target/release/bundle/**/*.exe
6065 desktop/src-tauri/target/release/bundle/**/*.msi
6166 desktop/src-tauri/target/release/bundle/**/*.dmg
62- desktop/src-tauri/target/release/bundle/**/*.app.tar.gz
67+ desktop/src-tauri/target/universal-apple-darwin/release/bundle/**/*.dmg
68+ desktop/src-tauri/target/universal-apple-darwin/release/bundle/**/*.app.tar.gz
6369 if-no-files-found : error
You can’t perform that action at this time.
0 commit comments