8000 CI: only run releasing for tags · symfony-cli/symfony-cli@5729565 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5729565

Browse files
committed
CI: only run releasing for tags
1 parent 55bfb50 commit 5729565

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/releaser.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/setup-go@v2
2424
with:
2525
go-version: 1.17
26-
-
26+
-
2727
name: Set AUTOUPDATE_CHANNEL on tags
2828
run: echo "AUTOUPDATE_CHANNEL=stable" >> $GITHUB_ENV
2929
if: startsWith(github.ref, 'refs/tags/v')
@@ -46,12 +46,24 @@ jobs:
4646
-
4747
name: Test
4848
run: go test -v ./...
49-
-
49+
-
5050
name: Set up cosign
5151
uses: sigstore/cosign-installer@v2.0.0
52+
-
53+
name: Run GoReleaser for snapshot
54+
uses: goreleaser/goreleaser-action@v2
55+
# only for PRs and push on branches
56+
if: startsWith(github.ref, 'refs/heads/')
57+
with:
58+
version: latest
59+
args: build --rm-dist --snapshot
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5262
-
5363
name: Run GoReleaser
5464
uses: goreleaser/goreleaser-action@v2
65+
# only for tags
66+
if: startsWith(github.ref, 'refs/tags/v')
5567
with:
5668
version: latest
5769
args: release --rm-dist

0 commit comments

Comments
 (0)
0