File tree Expand file tree Collapse file tree 2 files changed +47
-9
lines changed Expand file tree Collapse file tree 2 files changed +47
-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,36 @@ 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=validate
32+
33+ build-macos :
34+ runs-on : macos-latest
35+ needs : build-linux-windows # Assegura que este job execute após o primeiro
36+ steps :
37+ - name : Checkout
38+ uses : actions/checkout@v4
39+ with :
40+ fetch-depth : 0
41+ - name : Set up Go
42+ uses : actions/setup-go@v5
43+ with :
44+ go-version : ' 1.23'
45+ - name : Run GoReleaser for macOS
2746 env :
2847 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48+ BUILD_TARGET : macos
49+ uses : goreleaser/goreleaser-action@v6
50+ with :
51+ distribution : goreleaser
52+ version : " ~> v2"
53+ args : release --clean --skip=announce,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,10 +54,8 @@ changelog:
3954checksum :
4055 name_template : " checksums.txt"
4156
42- snapshot :
43- name_template : " {{ .Tag }}-{{ .ShortCommit }}"
44-
4557release :
4658 github :
4759 owner : leandrodaf
4860 name : Pianalyze
61+ replace : true
You can’t perform that action at this time.
0 commit comments