From 096b1b0d81ab98790a39ad2b4244208ca1f10727 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 18 Nov 2025 16:33:13 +0800 Subject: [PATCH] fix(ci): update Rust cache configuration and artifact paths in dev workflow --- .github/workflows/dev.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ebe4d231b..7ec45cb14 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -77,13 +77,15 @@ jobs: uses: dtolnay/rust-toolchain@1.91.0 - name: Rust Cache - if: github.event.inputs[matrix.input] == 'true' uses: Swatinem/rust-cache@v2 with: - workspaces: src-tauri - save-if: false - cache-all-crates: true - key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }} + save-if: ${{ github.ref == 'refs/heads/dev' }} + prefix-key: "v1-rust" + key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}" + workspaces: | + . -> target + cache-all-crates: false + cache-workspace-crates: true - name: Install dependencies (ubuntu only) if: matrix.os == 'ubuntu-22.04' && github.event.inputs[matrix.input] == 'true' @@ -145,7 +147,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg + path: target/${{ matrix.target }}/release/bundle/dmg/*.dmg if-no-files-found: error - name: Upload Artifacts (Windows) @@ -153,7 +155,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe + path: target/${{ matrix.target }}/release/bundle/nsis/*.exe if-no-files-found: error - name: Upload Artifacts (Linux) @@ -161,5 +163,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} - path: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb + path: target/${{ matrix.target }}/release/bundle/deb/*.deb if-no-files-found: error