ci(release): 调整CI构建配置并完善签名配置

1. 移除了macOS Intel架构的构建任务
2. 调整了安装步骤的顺序,先安装Node再安装pnpm
3. 新增macOS Apple Silicon架构的rust target添加步骤
4. 配置了Tauri打包所需的签名密钥环境变量
This commit is contained in:
sparksfly 2026-08-21 16:42:15 +08:00
parent d070ea8aa7
commit 2b98927bb8
1 changed files with 13 additions and 10 deletions

View File

@ -19,10 +19,6 @@ jobs:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
# macOS Intel
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
# Windows x64
- platform: "windows-latest"
args: ""
@ -34,22 +30,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
# 3. 安装 Node.js
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
# 2. 安装 Node.js
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: lts/*
cache: "pnpm"
# 3. 安装 pnpm
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 11
# 4. 安装 Rust
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Add macOS Apple Silicon target
if: matrix.platform == 'macos-latest'
run: rustup target add aarch64-apple-darwin
# 5. Rust 缓存(大幅加速后续构建)
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
@ -65,6 +66,8 @@ jobs:
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: v__VERSION__ # 自动替换为 tauri.conf.json 里的版本号
releaseName: "StealthReader v__VERSION__"