Skip to content

Commit

Permalink
Improve release workflows speed (#1397)
Browse files Browse the repository at this point in the history
Removing extra cache store with setup-go action 
and adding ~/.cache/go-build to the cached directory list
  • Loading branch information
mlsmaycon authored Dec 18, 2023
1 parent 818c6b8 commit 3168b80
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3168b80

Please sign in to comment.