File tree Expand file tree Collapse file tree 2 files changed +45
-15
lines changed Expand file tree Collapse file tree 2 files changed +45
-15
lines changed Original file line number Diff line number Diff line change @@ -6,34 +6,22 @@ name: Go
6
6
on :
7
7
push :
8
8
branches : ["main"]
9
- tags :
10
- - " v*"
11
9
pull_request :
12
10
branches : ["main"]
13
11
14
12
jobs :
15
13
build :
16
14
runs-on : ubuntu-latest
17
15
steps :
18
- - uses : actions/checkout@v3
16
+ - uses : actions/checkout@v4
19
17
20
18
- name : Set up Go
21
- uses : actions/setup-go@v3
19
+ uses : actions/setup-go@v5
22
20
with :
23
- go-version : 1.23
21
+ go-version : stable
24
22
25
23
- name : Build
26
24
run : go build -v ./...
27
25
28
26
- name : Test
29
27
run : go test -v ./...
30
-
31
- - name : Run GoReleaser
32
- uses : goreleaser/goreleaser-action@v6
33
- if : success() && startsWith(github.ref, 'refs/tags/')
34
- with :
35
- distribution : goreleaser
36
- version : " ~> v2"
37
- args : release --clean
38
- env :
39
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ # .github/workflows/release.yml
2
+ name : goreleaser
3
+
4
+ on :
5
+ pull_request :
6
+ push :
7
+ # run only against tags
8
+ tags :
9
+ - " *"
10
+
11
+ permissions :
12
+ contents : write
13
+ # packages: write
14
+ # issues: write
15
+ # id-token: write
16
+
17
+ jobs :
18
+ goreleaser :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v4
23
+ with :
24
+ fetch-depth : 0
25
+ - name : Set up Go
26
+ uses : actions/setup-go@v5
27
+ with :
28
+ go-version : stable
29
+ # More assembly might be required: Docker logins, GPG, etc.
30
+ # It all depends on your needs.
31
+ - name : Run GoReleaser
32
+ uses : goreleaser/goreleaser-action@v6
33
+ with :
34
+ # either 'goreleaser' (default) or 'goreleaser-pro'
35
+ distribution : goreleaser
36
+ # 'latest', 'nightly', or a semver
37
+ version : " ~> v2"
38
+ args : release --clean
39
+ env :
40
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
42
+ # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
You can’t perform that action at this time.
0 commit comments