Skip to content

Commit 9259459

Browse files
committed
fix go releaser
1 parent c87de5b commit 9259459

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
name: goreleaser
22

33
on:
4-
pull_request:
54
push:
5+
# run only against tags
66
tags:
77
- "*"
88

9+
permissions:
10+
contents: write
11+
# packages: write
12+
# issues: write
13+
914
jobs:
1015
goreleaser:
1116
runs-on: ubuntu-latest
1217
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1519
with:
1620
fetch-depth: 0
17-
- name: Set up Go
18-
uses: actions/setup-go@v2
21+
- run: git fetch --force --tags
22+
- uses: actions/setup-go@v3
1923
with:
20-
go-version: 1.20
21-
- name: Run GoReleaser
22-
uses: goreleaser/goreleaser-action@v2
24+
go-version: ">=1.20.1"
25+
cache: true
26+
# More assembly might be required: Docker logins, GPG, etc. It all depends
27+
# on your needs.
28+
- uses: goreleaser/goreleaser-action@v4
2329
with:
30+
# either 'goreleaser' (default) or 'goreleaser-pro':
31+
distribution: goreleaser
2432
version: latest
25-
args: release --rm-dist
33+
args: release --clean
2634
env:
2735
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
37+
# distribution:
38+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 commit comments

Comments
 (0)