Skip to content

Commit 93003a8

Browse files
authored
Update release.yml
1 parent c050e83 commit 93003a8

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

.github/workflows/release.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
1-
name: Release Go project
1+
name: goreleaser
22

33
on:
44
push:
5+
# run only against tags
56
tags:
6-
- "*"
7+
- '*'
8+
9+
permissions:
10+
contents: write
11+
# packages: write
12+
# issues: write
713

814
jobs:
9-
build:
10-
name: GoReleaser build
15+
goreleaser:
1116
runs-on: ubuntu-latest
12-
1317
steps:
14-
- name: Check out code into the Go module directory
18+
-
19+
name: Checkout
1520
uses: actions/checkout@v2
1621
with:
17-
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
18-
19-
- name: Set up Go 1.17
22+
fetch-depth: 0
23+
-
24+
name: Fetch all tags
25+
run: git fetch --force --tags
26+
-
27+
name: Set up Go
2028
uses: actions/setup-go@v2
2129
with:
22-
go-version: 1.17
23-
id: go
24-
25-
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@master
30+
go-version: 1.18
31+
-
32+
name: Run GoReleaser
33+
uses: goreleaser/goreleaser-action@v2
2734
with:
35+
# either 'goreleaser' (default) or 'goreleaser-pro'
36+
distribution: goreleaser
2837
version: latest
2938
args: release --rm-dist
3039
env:
3140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
42+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 commit comments

Comments
 (0)