From 2b98927bb819e3d099cca01f4e456658ae74088c Mon Sep 17 00:00:00 2001 From: sparksfly Date: Fri, 21 Aug 2026 16:42:15 +0800 Subject: [PATCH] =?UTF-8?q?ci(release):=20=E8=B0=83=E6=95=B4CI=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E9=85=8D=E7=BD=AE=E5=B9=B6=E5=AE=8C=E5=96=84=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 移除了macOS Intel架构的构建任务 2. 调整了安装步骤的顺序,先安装Node再安装pnpm 3. 新增macOS Apple Silicon架构的rust target添加步骤 4. 配置了Tauri打包所需的签名密钥环境变量 --- .github/workflows/release.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfc074a..5568a95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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__"