From cceee42eed8a2be7b659763a5f6f01a25bf799f6 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 6 Jun 2024 21:28:47 +0200 Subject: [PATCH] Simplified Rust cache key --- .github/workflows/build-and-release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 8ee89905..ce437c5c 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -85,8 +85,6 @@ jobs: - name: Create parts for the Rust cache key run: | cd runtime - echo "TAURI_VERSION=$(grep '^tauri = ' Cargo.toml | sed 's/.*version = \"\([^\"]*\)\".*/\1/')" >> $GITHUB_ENV - echo "TAURI_BUILD_VERSION=$(grep '^tauri-build = ' Cargo.toml | sed 's/.*version = \"\([^\"]*\)\".*/\1/')" >> $GITHUB_ENV echo "RUST_VERSION=$(rustc --version | sed 's/rustc \([0-9.]*\).*/\1/')" >> $GITHUB_ENV echo "CARGO_LOCK_HASH=${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_ENV @@ -100,9 +98,9 @@ jobs: ~/.cargo/registry/cache/ ~/.rustup/toolchains target/ - key: target-${{ matrix.dotnet_runtime }}-tauri-build-${{ env.TAURI_BUILD_VERSION }}-tauri-${{ env.TAURI_VERSION }}-cargo-rust-${{ env.RUST_VERSION }}-dependencies-${{ env.CARGO_LOCK_HASH }} + key: target-${{ matrix.dotnet_runtime }}-rust-${{ env.RUST_VERSION }}-dependencies-${{ env.CARGO_LOCK_HASH }} restore-keys: | - target-${{ matrix.dotnet_runtime }}-tauri-build-${{ env.TAURI_BUILD_VERSION }}-tauri-${{ env.TAURI_VERSION }}-cargo-rust-${{ env.RUST_VERSION }}-dependencies- + target-${{ matrix.dotnet_runtime }}-rust-${{ env.RUST_VERSION }}-dependencies- - name: Setup Rust (stable) uses: dtolnay/rust-toolchain@stable