File tree 2 files changed +60
-16
lines changed
2 files changed +60
-16
lines changed Original file line number Diff line number Diff line change 1
1
name : Release
2
2
3
3
on :
4
- release :
5
- types : [created]
4
+ push :
5
+ tags :
6
+ - ' v*'
6
7
7
8
jobs :
8
- releases-matrix :
9
- name : Release Go Binary
9
+ goreleaser :
10
+ name : Release
10
11
runs-on : ubuntu-latest
11
- strategy :
12
- matrix :
13
- goos : [linux, windows, darwin]
14
- goarch : [amd64]
12
+ timeout-minutes : 30
13
+ permissions :
14
+ contents : write
15
15
steps :
16
16
- name : Checkout
17
- uses : actions/checkout@v2
18
- -
uses :
wangyoucao577/[email protected]
17
+ uses : actions/checkout@v4
19
18
with :
20
- github_token : ${{ secrets.GITHUB_TOKEN }}
21
- goos : ${{ matrix.goos }}
22
- goarch : ${{ matrix.goarch }}
23
- goversion : 1.20
24
- pre_command : export CGO_ENABLED=0
25
- project_path : " ./sql-migrate"
19
+ fetch-depth : 0
20
+
21
+ - name : Set up Go
22
+ uses : actions/setup-go@v5
23
+ with :
24
+ go-version-file : go.mod
25
+
26
+ - name : Run GoReleaser
27
+ uses : goreleaser/goreleaser-action@v6
28
+ with :
29
+ version : ' ~> v2'
30
+ args : release --clean
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2
+ version : 2
3
+
4
+ builds :
5
+ - binary : sql-migrate
6
+ main : ./sql-migrate/main.go
7
+ goos :
8
+ - darwin
9
+ - linux
10
+ goarch :
11
+ - ' 386'
12
+ - amd64
13
+ - arm64
14
+ goarm :
15
+ - ' 6'
16
+ ignore :
17
+ - goos : darwin
18
+ goarch : ' 386'
19
+ env :
20
+ - CGO_ENABLED=0
21
+ mod_timestamp : ' {{ .CommitTimestamp }}'
22
+ flags :
23
+ - -trimpath
24
+ ldflags :
25
+ - -s -w
26
+
27
+ gomod :
28
+ proxy : true
29
+
30
+ archives :
31
+ - name_template : " {{.Binary}}_{{.Os}}_{{.Arch}}"
32
+ files :
33
+ - README.md
34
+ - LICENSE
35
+
36
+ release :
37
+ draft : false
You can’t perform that action at this time.
0 commit comments