From f648628b7bfbde22ff0805b07e0d40e1cfb0dac3 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 7 Jun 2024 07:36:33 +0200 Subject: [PATCH] Fixed cache key for Windows --- .github/workflows/build-and-release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index ce437c5c..dbc28cb5 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -82,12 +82,20 @@ jobs: cd publish/dotnet mv mindworkAIStudio.exe "../../app/MindWork AI Studio/bin/dist/mindworkAIStudio${{ matrix.dotnet_name_postfix }}" - - name: Create parts for the Rust cache key + - name: Create parts for the Rust cache key (Unix systems) + if: matrix.platform != 'windows-latest' run: | cd runtime echo "RUST_VERSION=$(rustc --version | sed 's/rustc \([0-9.]*\).*/\1/')" >> $GITHUB_ENV echo "CARGO_LOCK_HASH=${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_ENV + - name: Create parts for the Rust cache key (Windows) + if: matrix.platform == 'windows-latest' + run: | + cd runtime + echo "RUST_VERSION=$(rustc --version | ForEach-Object { $_ -replace 'rustc (\d+\.\d+\.\d+).*', '$1' })" >> $env:GITHUB_ENV + echo "CARGO_LOCK_HASH=${{ hashFiles('**/Cargo.lock') }}" >> $env:GITHUB_ENV + - name: Cache Rust uses: actions/cache@v4 with: