File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : goreleaser
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - .github/workflows/release.yml
7+ - .goreleaser.yaml
8+ push :
9+ tags :
10+ - ' v*'
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ release :
17+ runs-on : ubuntu-latest
18+
19+ permissions :
20+ contents : write
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v3
25+ with :
26+ fetch-depth : 0
27+
28+ - uses : actions/setup-go@v5
29+ with :
30+ go-version : v1.22.10
31+
32+ - name : Delete non-semver tags
33+ run : ' git tag -d $(git tag -l | grep -v "^v")'
34+
35+ - name : Run GoReleaser on tag
36+ if : github.event_name != 'pull_request'
37+ uses : goreleaser/goreleaser-action@v6
38+ with :
39+ distribution : goreleaser
40+ version : latest
41+ args : release --timeout 60m
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+
45+ - name : Run GoReleaser on pull request
46+ if : github.event_name == 'pull_request'
47+ uses : goreleaser/goreleaser-action@v6
48+ with :
49+ distribution : goreleaser
50+ version : latest
51+ args : release --timeout 60m --snapshot
52+ env :
53+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+
55+ - uses : actions/upload-artifact@v4
56+ if : ${{ always() }}
57+ with :
58+ name : binaries
59+ path : dist/*.tar.gz
You can’t perform that action at this time.
0 commit comments