Quellcode durchsuchen

【修复】更新 GitHub Actions 工作流以使用矩阵构建

- 将条件判断从 inputs.platform 更改为 matrix.os
- 更新缓存键和构建产物名称以使用 matrix.os
- 优化工作流以适应多平台构建
PJ568 vor 1 Jahr
Ursprung
Commit
7c35e0a71d
3 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen
  1. 7 7
      .github/workflows/build-app.yaml
  2. 1 1
      Cargo.lock
  3. 1 1
      Cargo.toml

+ 7 - 7
.github/workflows/build-app.yaml

@@ -47,28 +47,28 @@ jobs:
           node-version: 18
 
       - name: 为 ubuntu-latest 安装 Rust
-        if: inputs.platform == 'ubuntu-latest'
+        if: ${{ matrix.os }} == 'ubuntu-latest'
         uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: stable
           target: x86_64-unknown-linux-musl
 
       - name: 为 windows-latest 安装 Rust
-        if: inputs.platform == 'windows-latest'
+        if: ${{ matrix.os }} == 'windows-latest'
         uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: stable-x86_64-msvc
           target: x86_64-pc-windows-msvc
 
       - name: 为 macos-latest 安装 Rust
-        if: inputs.platform == 'macos-latest'
+        if: ${{ matrix.os }} == 'macos-latest'
         uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: stable
           target: x86_64-apple-darwin
 
       - name: 安装依赖(仅 Ubuntu 需)
-        if: inputs.platform == 'ubuntu-24.04'
+        if: ${{ matrix.os }} == 'ubuntu-24.04'
         uses: awalsh128/[email protected]
         with:
           packages: libsoup3.0-dev libdbus-1-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
@@ -88,7 +88,7 @@ jobs:
             ~/.cargo/registry/cache/
             ~/.cargo/git/db/
             node_modules/pake-cli/src-tauri/target/
-          key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
+          key: ${{ matrix.os }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
 
       - name: 安装依赖
         run: |
@@ -115,7 +115,7 @@ jobs:
       - name: 上传包
         uses: actions/upload-artifact@v4
         with:
-          name: output-${{ inputs.platform }}.zip
+          name: output-${{ matrix.os }}.zip
           path: node_modules/pake-cli/output/*
           retention-days: 3
 
@@ -129,4 +129,4 @@ jobs:
             ~/.cargo/registry/cache/
             ~/.cargo/git/db/
             node_modules/pake-cli/src-tauri/target/
-          key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
+          key: ${{ matrix.os }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}

+ 1 - 1
Cargo.lock

@@ -2449,7 +2449,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
 
 [[package]]
 name = "yaa"
-version = "2.7.2"
+version = "2.7.3"
 dependencies = [
  "actix-cors",
  "actix-web",

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "yaa"
-version = "2.7.2"
+version = "2.7.3"
 edition = "2024"
 
 [dependencies]