@@ -135,19 +135,28 @@ jobs:
135
135
with :
136
136
go-version : " ^1.17"
137
137
138
- - uses : actions/cache@v3
138
+ - id : go-cache-paths
139
+ run : |
140
+ echo "::set-output name=go-build::$(go env GOCACHE)"
141
+ echo "::set-output name=go-mod::$(go env GOMODCACHE)"
142
+
143
+ - name : Go Build Cache
144
+ uses : actions/cache@v3
139
145
with :
140
- # Go mod cache, Linux build cache, Mac build cache, Windows build cache
141
- path : |
142
- ~/go/pkg/mod
143
- ~/.cache/go-build
144
- ~/Library/Caches/go-build
145
- %LocalAppData%\go-build
146
- key : ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
147
- restore-keys : |
148
- ${{ matrix.os }}-go-
146
+ path : ${{ steps.go-cache-paths.outputs.go-build }}
147
+ key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
149
148
150
- - run : go install gotest.tools/gotestsum@latest
149
+ - name : Go Mod Cache
150
+ uses : actions/cache@v3
151
+ with :
152
+ path : ${{ steps.go-cache-paths.outputs.go-mod }}
153
+ key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
154
+
155
+ - name : Install goreleaser
156
+
157
+ with :
158
+ repo : goreleaser/goreleaser
159
+ tag : v1.7.0
151
160
152
161
- uses : hashicorp/setup-terraform@v1
153
162
with :
@@ -339,17 +348,22 @@ jobs:
339
348
with :
340
349
install-only : true
341
350
342
- - uses : actions/cache@v3
351
+ - id : go-cache-paths
352
+ run : |
353
+ echo "::set-output name=go-build::$(go env GOCACHE)"
354
+ echo "::set-output name=go-mod::$(go env GOMODCACHE)"
355
+
356
+ - name : Go Build Cache
357
+ uses : actions/cache@v3
343
358
with :
344
- # Go mod cache, Linux build cache, Mac build cache, Windows build cache
345
- path : |
346
- ~/go/pkg/mod
347
- ~/.cache/go-build
348
- ~/Library/Caches/go-build
349
- %LocalAppData%\go-build
350
- key : ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
351
- restore-keys : |
352
- ${{ matrix.os }}-go-
359
+ path : ${{ steps.go-cache-paths.outputs.go-build }}
360
+ key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
361
+
362
+ - name : Go Mod Cache
363
+ uses : actions/cache@v3
364
+ with :
365
+ path : ${{ steps.go-cache-paths.outputs.go-mod }}
366
+ key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
353
367
354
368
- run : make build
355
369
0 commit comments