Skip to content

Commit b2ad26a

Browse files
chore: Update release.yaml to use goreleaser-action v5
1 parent 6439dc5 commit b2ad26a

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

Diff for: .github/workflows/release.yaml

+24-25
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1-
name: Release
1+
name: goreleaser
22

33
on:
4-
release:
5-
types: [created]
6-
workflow_dispatch:
7-
4+
pull_request:
5+
push:
6+
7+
permissions:
8+
contents: write
89

910
jobs:
1011
goreleaser:
1112
runs-on: ubuntu-latest
1213
steps:
13-
- name: Check out code
14-
uses: actions/checkout@v3
15-
with:
16-
fetch-depth: 0 # Important for Goreleaser to access all commits
17-
18-
- name: Set up Go
19-
uses: actions/setup-go@v3
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v4
2017
with:
21-
go-version: 1.22
22-
23-
- name: Set up Goreleaser
24-
uses: goreleaser/goreleaser-action@v3
25-
with:
26-
version: latest
27-
args: release --rm-dist --snapshot
28-
29-
- name: Run Goreleaser
30-
uses: goreleaser/goreleaser-action@v3
18+
fetch-depth: 0
19+
-
20+
name: Set up Go
21+
uses: actions/setup-go@v4
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v5
3125
with:
32-
version: latest
33-
args: release --rm-dist
26+
# either 'goreleaser' (default) or 'goreleaser-pro'
27+
distribution: goreleaser
28+
# 'latest', 'nightly', or a semver
29+
version: '~> v1'
30+
args: release --clean
3431
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
34+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 commit comments

Comments
 (0)