fix(ci): update Rust cache configuration and artifact paths in dev workflow

This commit is contained in:
Tunglies
2025-11-18 16:33:13 +08:00
parent 7a81a673f3
commit 096b1b0d81

View File

@@ -77,13 +77,15 @@ jobs:
uses: dtolnay/rust-toolchain@1.91.0 uses: dtolnay/rust-toolchain@1.91.0
- name: Rust Cache - name: Rust Cache
if: github.event.inputs[matrix.input] == 'true'
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
with: with:
workspaces: src-tauri save-if: ${{ github.ref == 'refs/heads/dev' }}
save-if: false prefix-key: "v1-rust"
cache-all-crates: true key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}"
key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }} workspaces: |
. -> target
cache-all-crates: false
cache-workspace-crates: true
- name: Install dependencies (ubuntu only) - name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-22.04' && github.event.inputs[matrix.input] == 'true' if: matrix.os == 'ubuntu-22.04' && github.event.inputs[matrix.input] == 'true'
@@ -145,7 +147,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ matrix.target }} 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 if-no-files-found: error
- name: Upload Artifacts (Windows) - name: Upload Artifacts (Windows)
@@ -153,7 +155,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ matrix.target }} 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 if-no-files-found: error
- name: Upload Artifacts (Linux) - name: Upload Artifacts (Linux)
@@ -161,5 +163,5 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ matrix.target }} 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 if-no-files-found: error