File tree Expand file tree Collapse file tree 3 files changed +33
-12
lines changed
Expand file tree Collapse file tree 3 files changed +33
-12
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Lint & Test
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [ master ]
66 pull_request :
77 branches : [ master ]
88
@@ -12,22 +12,26 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15+ - name : Create cache directories
16+ run : |
17+ mkdir -p ~/.cache/golangci-lint
18+ mkdir -p ~/.cache/go-build
19+
1520 - uses : actions/checkout@v4
16- - name : Set up Go
17- uses : actions/setup-go@v5
21+ - uses : actions/setup-go@v5
1822 with :
19- go-version : 1.22
23+ go-version-file : ' go.mod '
2024
2125 - name : Go Lint Cache
22- uses : actions/cache@v3
26+ uses : actions/cache@v4
2327 with :
2428 path : ~/.cache/golangci-lint/
2529 key : go-lint-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
2630 restore-keys : |
2731 go-lint-cache-${{ runner.os }}-
2832
2933 - name : Go Mod Cache
30- uses : actions/cache@v3
34+ uses : actions/cache@v4
3135 with :
3236 path : |
3337 ~/.cache/go-build
Original file line number Diff line number Diff line change 11name : Release
22on :
3- create :
4- tags :
5- - v*
3+ push :
4+ tags : [ "v*.*.*" ]
5+
66jobs :
77 release :
88 name : Release on GitHub
99 runs-on : ubuntu-latest
1010 steps :
1111 - name : Checkout
1212 uses : actions/checkout@v4
13+
14+ - name : Create cache directories
15+ run : |
16+ mkdir -p ~/.cache/go-build
17+
18+ - name : Go Mod Cache
19+ uses : actions/cache@v4
20+ with :
21+ path : |
22+ ~/.cache/go-build
23+ key : go-mod-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
24+ restore-keys : |
25+ go-mod-cache-${{ runner.os }}-
26+ go-mod-cache-
27+
28+
1329 - uses : actions/setup-go@v5
1430 with :
1531 go-version-file : ' go.mod'
32+
1633 - name : Run GoReleaser
1734 uses : goreleaser/goreleaser-action@v5
1835 with :
1936 version : latest
2037 args : release --clean
2138 env :
22- GITHUB_TOKEN : ${{ secrets.TOKEN }}
39+ GITHUB_TOKEN : ${{ secrets.RELEASER_TOKEN }}
Original file line number Diff line number Diff line change 11builds :
2- - main : ./cmds/protoc-gen-go-errors /main.go
2+ - main : ./cmds/protoc-gen-go-errors2 /main.go
33 id : protoc-gen-go-errors
44 binary : protoc-gen-go-errors
55 goos :
99 goarch :
1010 - amd64
1111 - arm64
12- - main : ./cmds/protoc-gen-go-enum /main.go
12+ - main : ./cmds/protoc-gen-go-enum2 /main.go
1313 id : protoc-gen-go-enum
1414 binary : protoc-gen-go-enum
1515 goos :
You can’t perform that action at this time.
0 commit comments