Skip to content

Commit dc8bb01

Browse files
authored
Update release workflow (#13)
1 parent 08254a0 commit dc8bb01

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/release.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,27 @@ on:
1616
- "v*"
1717
jobs:
1818
goreleaser:
19-
environment: Default
2019
runs-on: ubuntu-latest
2120
steps:
22-
- name: Checkout
23-
uses: actions/[email protected]
24-
- name: Unshallow
25-
run: git fetch --prune --unshallow
26-
- name: Set up Go
27-
uses: actions/setup-go@v2
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2822
with:
29-
go-version: 1.19
23+
# Allow goreleaser to access older tag information.
24+
fetch-depth: 0
25+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
26+
with:
27+
go-version-file: "go.mod"
28+
cache: true
3029
- name: Import GPG key
30+
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
3131
id: import_gpg
32-
uses: crazy-max/[email protected]
3332
with:
3433
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
3534
passphrase: ${{ secrets.PASSPHRASE }}
3635
- name: Run GoReleaser
37-
uses: goreleaser/goreleaser-action@v2.5.0
36+
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
3837
with:
39-
version: latest
40-
args: release --rm-dist
38+
args: release --clean
4139
env:
42-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
43-
# GitHub sets this automatically
40+
# GitHub sets the GITHUB_TOKEN secret automatically.
4441
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 commit comments

Comments
 (0)