File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name : goreleaser
33
44on :
5+ workflow_dispatch :
6+ pull_request :
57 push :
6- branches :
7- - ' main'
8- tags :
9- - ' v*'
8+ tags : ['v*']
109
1110permissions :
1211 contents : write
13- # packages: write
14- # issues: write
15- # id-token: write
12+ id-token : write
13+ packages : write
1614
1715jobs :
1816 goreleaser :
1917 runs-on : ubuntu-latest
18+ env :
19+ flags : " "
2020 steps :
21+ - if : ${{ !startsWith(github.ref, 'refs/tags/v') }}
22+ run : echo "flags=--snapshot" >> $GITHUB_ENV
2123 - name : Checkout
2224 uses : actions/checkout@v4
2325 with :
3537 distribution : goreleaser
3638 # 'latest', 'nightly', or a semver
3739 version : " ~> v2"
38- args : release --clean
40+ args : release --clean ${{ env.flags }}
3941 env :
4042 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4143 # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
Original file line number Diff line number Diff line change 11version : 2
2+ before :
3+ hooks :
4+ - go mod download
25builds :
36 - env :
47 - CGO_ENABLED=0
You can’t perform that action at this time.
0 commit comments