File tree Expand file tree Collapse file tree 3 files changed +54
-25
lines changed Expand file tree Collapse file tree 3 files changed +54
-25
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches : [ main ]
6
6
7
+ env :
8
+ GOPATH : /go_path
9
+ GOCACHE : /go_cache
10
+
7
11
jobs :
8
12
goreleaser :
9
13
runs-on : ubuntu-latest
10
14
steps :
11
15
- uses : actions/checkout@v3
12
16
with :
13
- fetch-depth : 0
14
- - run : git fetch --force --tags
17
+ fetch-depth : 0 # all history for all branches and tags
15
18
- uses : actions/setup-go@v3
16
19
with :
17
20
go-version : ' >=1.20.1'
21
+ -
uses :
https://gitea.com/actions/[email protected]
22
+ id : hash-go
23
+ with :
24
+ patterns : |
25
+ go.mod
26
+ go.sum
27
+ - name : cache go
28
+ id : cache-go
29
+ uses : https://github.com/actions/cache@v3
30
+ with :
31
+ path : |
32
+ /go_path
33
+ /go_cache
34
+ key : go_path-${{ steps.hash-go.outputs.hash }}
18
35
- name : goreleaser
19
36
uses : https://github.com/goreleaser/goreleaser-action@v4
20
37
with :
Original file line number Diff line number Diff line change 5
5
tags :
6
6
- ' *'
7
7
8
+ env :
9
+ GOPATH : /go_path
10
+ GOCACHE : /go_cache
11
+
8
12
jobs :
9
13
goreleaser :
10
14
runs-on : ubuntu-latest
11
15
steps :
12
16
- uses : actions/checkout@v3
13
17
with :
14
- fetch-depth : 0
15
- - run : git fetch --force --tags
18
+ fetch-depth : 0 # all history for all branches and tags
16
19
- uses : actions/setup-go@v3
17
20
with :
18
21
go-version : ' >=1.20.1'
22
+ -
uses :
https://gitea.com/actions/[email protected]
23
+ id : hash-go
24
+ with :
25
+ patterns : |
26
+ go.mod
27
+ go.sum
28
+ - name : cache go
29
+ id : cache-go
30
+ uses : https://github.com/actions/cache@v3
31
+ with :
32
+ path : |
33
+ /go_path
34
+ /go_cache
35
+ key : go_path-${{ steps.hash-go.outputs.hash }}
19
36
- name : Import GPG key
20
37
id : import_gpg
21
38
uses : https://github.com/crazy-max/ghaction-import-gpg@v5
Original file line number Diff line number Diff line change 4
4
- pull_request
5
5
6
6
env :
7
- GOPROXY : https://goproxy.io,direct
8
7
GOPATH : /go_path
9
8
GOCACHE : /go_cache
10
9
@@ -13,31 +12,27 @@ jobs:
13
12
name : check and test
14
13
runs-on : ubuntu-latest
15
14
steps :
16
- - name : cache go path
17
- id : cache-go-path
18
- uses : https://github.com/actions/cache@v3
15
+ - uses : actions/checkout@v3
16
+ - uses : actions/setup-go@v3
19
17
with :
20
- path : /go_path
21
- key : go_path-${{ github.repository }}-${{ github.ref_name }}
22
- restore-keys : |
23
- go_path-${{ github.repository }}-
24
- go_path-
25
- - name : cache go cache
26
- id : cache-go-cache
27
- uses : https://github.com/actions/cache@v3
18
+ go-version : ' >=1.20.1'
19
+ -
uses :
https://gitea.com/actions/[email protected]
20
+ id : hash-go
28
21
with :
29
- path : /go_cache
30
- key : go_cache-${{ github.repository }}-${{ github.ref_name }}
31
- restore-keys : |
32
- go_cache-${{ github.repository }}-
33
- go_cache-
34
- - uses : actions/setup-go @v3
22
+ patterns : |
23
+ go.mod
24
+ go.sum
25
+ - name : cache go
26
+ id : cache-go
27
+ uses : https://github.com/ actions/cache @v3
35
28
with :
36
- go-version : 1.20
37
- - uses : actions/checkout@v3
29
+ path : |
30
+ /go_path
31
+ /go_cache
32
+ key : go_path-${{ steps.hash-go.outputs.hash }}
38
33
- name : vet checks
39
34
run : make vet
40
35
- name : build
41
36
run : make build
42
37
- name : test
43
- run : make test
38
+ run : make test
You can’t perform that action at this time.
0 commit comments