Skip to content

Commit d037581

Browse files
committed
Only build on v tags.
1 parent cb3cc4c commit d037581

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/goreleaser.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
name: Build application binaries.
22

33
on:
4-
pull_request:
54
push:
5+
tags:
6+
- "v*"
7+
# branches:
8+
# - main
69

710
jobs:
811
goreleaser:
912
runs-on: ubuntu-latest
1013
steps:
11-
-
12-
name: Checkout
14+
- name: Checkout
1315
uses: actions/checkout@v2
1416
with:
1517
fetch-depth: 0
16-
-
17-
name: Set up Go
18+
19+
- name: Set up Go
1820
uses: actions/setup-go@v2
1921
with:
2022
go-version: 1.17
21-
-
22-
name: Run GoReleaser
23+
24+
- name: Run GoReleaser
2325
uses: goreleaser/goreleaser-action@v2
2426
with:
25-
# either 'goreleaser' (default) or 'goreleaser-pro'
26-
distribution: goreleaser
27-
version: latest
28-
args: release --rm-dist
27+
install-only: true
28+
29+
- name: GoReleaser version
30+
run: goreleaser -v
31+
32+
- name: Run Release
33+
# if: startsWith(github.ref, 'refs/tags/v')
34+
run: goreleaser release --rm-dist
2935
env:
3036
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)