File tree Expand file tree Collapse file tree 2 files changed +51
-9
lines changed Expand file tree Collapse file tree 2 files changed +51
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ permissions:
99 contents : write
1010
1111jobs :
12- goreleaser :
12+ build-linux-windows :
1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : Checkout
@@ -18,11 +18,35 @@ jobs:
1818 fetch-depth : 0
1919 - name : Set up Go
2020 uses : actions/setup-go@v5
21- - name : Run GoReleaser
21+ with :
22+ go-version : ' 1.23'
23+ - name : Run GoReleaser for Linux and Windows
24+ env :
25+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+ BUILD_TARGET : linux-windows
2227 uses : goreleaser/goreleaser-action@v6
2328 with :
2429 distribution : goreleaser
2530 version : " ~> v2"
26- args : release --clean
31+ args : release --clean --skip=publish,validate
32+
33+ build-macos :
34+ runs-on : macos-latest
35+ steps :
36+ - name : Checkout
37+ uses : actions/checkout@v4
38+ with :
39+ fetch-depth : 0
40+ - name : Set up Go
41+ uses : actions/setup-go@v5
42+ with :
43+ go-version : ' 1.23'
44+ - name : Run GoReleaser for macOS
2745 env :
2846 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ BUILD_TARGET : macos
48+ uses : goreleaser/goreleaser-action@v6
49+ with :
50+ distribution : goreleaser
51+ version : " ~> v2"
52+ args : release --clean --skip=publish,validate
Original file line number Diff line number Diff line change 1+
2+
13version : 2
24
35before :
@@ -6,15 +8,34 @@ before:
68 - go generate ./...
79
810builds :
9- - env :
10- - CGO_ENABLED=0
11+ - id : build-linux-windows
1112 goos :
12- - linux
1313 - windows
14+ - linux
15+ goarch :
16+ - amd64
17+ - arm64
18+ env :
19+ - CGO_ENABLED=0
20+ flags :
21+ - -trimpath
22+ when :
23+ env :
24+ BUILD_TARGET : linux-windows
25+
26+ - id : build-macos
27+ goos :
1428 - darwin
1529 goarch :
1630 - amd64
1731 - arm64
32+ env :
33+ - CGO_ENABLED=1
34+ flags :
35+ - -trimpath
36+ when :
37+ env :
38+ BUILD_TARGET : macos
1839
1940archives :
2041 - format : tar.gz
@@ -39,9 +60,6 @@ changelog:
3960checksum :
4061 name_template : " checksums.txt"
4162
42- snapshot :
43- name_template : " {{ .Tag }}-{{ .ShortCommit }}"
44-
4563release :
4664 github :
4765 owner : leandrodaf
You can’t perform that action at this time.
0 commit comments