diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afb617948..eb8466be0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,11 +45,18 @@ jobs: with: targets: ${{ matrix.target }} + - name: Compute dependency hash (excludes app version from Cargo.lock) + id: deps-hash + shell: bash + run: | + hash=$(sed '/^name = "dbx"$/,/^$/{ /^version = /d }' src-tauri/Cargo.lock | shasum -a 256 | cut -d' ' -f1) + echo "hash=${hash:0:20}" >> "$GITHUB_OUTPUT" + - name: Rust cache uses: swatinem/rust-cache@v2 with: workspaces: './src-tauri -> target' - shared-key: release-${{ matrix.target }} + shared-key: release-${{ matrix.target }}-${{ steps.deps-hash.outputs.hash }} cache-on-failure: true - name: Install Apple certificate (macOS)