File tree Expand file tree Collapse file tree 2 files changed +45
-9
lines changed Expand file tree Collapse file tree 2 files changed +45
-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 @@ -6,15 +6,30 @@ before:
66 - go generate ./...
77
88builds :
9- - env :
10- - CGO_ENABLED=0
9+ - id : build-linux-windows
1110 goos :
12- - linux
1311 - windows
12+ - linux
13+ goarch :
14+ - amd64
15+ - arm64
16+ env :
17+ - CGO_ENABLED=0
18+ flags :
19+ - -trimpath
20+ skip : ' {{ ne .Env.BUILD_TARGET "linux-windows" }}'
21+
22+ - id : build-macos
23+ goos :
1424 - darwin
1525 goarch :
1626 - amd64
1727 - arm64
28+ env :
29+ - CGO_ENABLED=1
30+ flags :
31+ - -trimpath
32+ skip : ' {{ ne .Env.BUILD_TARGET "macos" }}'
1833
1934archives :
2035 - format : tar.gz
@@ -39,9 +54,6 @@ changelog:
3954checksum :
4055 name_template : " checksums.txt"
4156
42- snapshot :
43- name_template : " {{ .Tag }}-{{ .ShortCommit }}"
44-
4557release :
4658 github :
4759 owner : leandrodaf
You can’t perform that action at this time.
0 commit comments