From c593e02f39cebd9e0d834f3a05b6201c9d587387 Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Fri, 27 Jan 2023 12:41:11 +0100 Subject: [PATCH] Fix (hopefully) the Release workflow cache The Release workflow doesn't restore the stale cache version in case of dependency changes, causing the build to start from scratch instead of being incremental. This might be caused by by a trailing newline in the `restore-keys`. In addition, this changes the cache key to remove `${{ runner.os }}` which is irrelevant to our use as we use the `ubuntu-latest` runners anyhow, and `-go-` since we're using a single cache anyhow so no need to tie it to golang. --- .github/workflows/release.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 050337ee3..cdb1f4da7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -43,9 +43,8 @@ jobs: path: | ~/.cache/go-build ~/go/pkg/mod - key: release-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - release-${{ runner.os }}-go- + key: release-${{ hashFiles('**/go.sum') }} + restore-keys: release- - name: Setup Go environment uses: actions/setup-go@v3