File tree Expand file tree Collapse file tree 1 file changed +53
-4
lines changed
Expand file tree Collapse file tree 1 file changed +53
-4
lines changed Original file line number Diff line number Diff line change 1414 - " v*"
1515
1616jobs :
17- linux :
17+ build :
1818 runs-on : ubuntu-latest
1919 if : github.repository_owner == 'ctrlplanedev'
20+ strategy :
21+ matrix :
22+ goos : [linux, darwin]
23+ goarch : [amd64, arm64]
24+ include :
25+ - goos : linux
26+ goarch : " 386"
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+ with :
31+ fetch-depth : 0
32+
33+ - name : Set up Go
34+ uses : actions/setup-go@v5
35+
36+ - name : Build with GoReleaser
37+ uses : goreleaser/goreleaser-action@v5
38+ with :
39+ distribution : goreleaser
40+ version : " ~> v2"
41+ args : release --clean --split
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
44+ GOOS : ${{ matrix.goos }}
45+ GOARCH : ${{ matrix.goarch }}
46+
47+ - name : Upload artifacts
48+ uses : actions/upload-artifact@v4
49+ with :
50+ name : dist-${{ matrix.goos }}-${{ matrix.goarch }}
51+ path : dist/**/*
52+ retention-days : 1
53+
54+ release :
55+ runs-on : ubuntu-latest
56+ needs : build
57+ if : github.repository_owner == 'ctrlplanedev'
2058 steps :
2159 - name : Checkout
2260 uses : actions/checkout@v4
61+ with :
62+ fetch-depth : 0
63+
2364 - name : Set up Go
2465 uses : actions/setup-go@v5
25- - name : Install GoReleaser
66+
67+ - name : Download all artifacts
68+ uses : actions/download-artifact@v4
69+ with :
70+ path : dist
71+ pattern : dist-*
72+ merge-multiple : true
73+
74+ - name : Merge and Release
2675 uses : goreleaser/goreleaser-action@v5
2776 with :
2877 distribution : goreleaser
2978 version : " ~> v2"
30- args : release --clean
79+ args : continue --merge
3180 env :
3281 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
3382
3483 docker :
35- needs : linux
84+ needs : release
3685 runs-on : ubuntu-latest
3786
3887 if : github.repository_owner == 'ctrlplanedev'
You can’t perform that action at this time.
0 commit comments