From 3168b80ad06e6af27531a4712825ad0539787345 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Mon, 18 Dec 2023 12:09:44 +0100 Subject: [PATCH] Improve release workflows speed (#1397) Removing extra cache store with setup-go action and adding ~/.cache/go-build to the cached directory list --- .github/workflows/release.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3d43a65b..e4875bf39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,14 +45,17 @@ jobs: uses: actions/setup-go@v4 with: go-version: "1.20" + cache: false - name: Cache Go modules uses: actions/cache@v3 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-releaser-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go- + ${{ runner.os }}-go-releaser- - name: Install modules run: go mod tidy @@ -118,13 +121,16 @@ jobs: uses: actions/setup-go@v4 with: go-version: "1.20" + cache: false - name: Cache Go modules uses: actions/cache@v3 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-ui-go-${{ hashFiles('**/go.sum') }} + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-ui-go-releaser-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-ui-go- + ${{ runner.os }}-ui-go-releaser- - name: Install modules run: go mod tidy @@ -170,14 +176,17 @@ jobs: uses: actions/setup-go@v4 with: go-version: "1.20" + cache: false - name: Cache Go modules uses: actions/cache@v3 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-ui-go-${{ hashFiles('**/go.sum') }} + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-ui-go-releaser-darwin-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-ui-go- + ${{ runner.os }}-ui-go-releaser-darwin- - name: Install modules run: go mod tidy