Skip to content

Commit 17ee9f8

Browse files
committed
fix: updated release workflow
1 parent b793add commit 17ee9f8

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,33 @@
1-
# This GitHub action can publish assets for release when a tag is created.
2-
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
3-
#
4-
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
5-
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
6-
# secret. If you would rather own your own GPG handling, please fork this action
7-
# or use an alternative one for key handling.
8-
#
9-
# You will need to pass the `--batch` flag to `gpg` in your signing step
10-
# in `goreleaser` to indicate this is being used in a non-interactive mode.
11-
#
121
name: release
132
on:
14-
push:
15-
tags:
16-
- "v*"
17-
permissions:
18-
contents: write
3+
workflow_dispatch:
4+
195
jobs:
206
goreleaser:
217
runs-on: ubuntu-latest
228
steps:
239
- name: Checkout
2410
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
2513

26-
- name: Unshallow
27-
run: git fetch --prune --unshallow
28-
29-
- uses: actions/setup-go@v5
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
3016
with:
31-
go-version-file: "go.mod"
32-
cache: true
17+
go-version-file: go.mod
3318

3419
- name: Import GPG key
35-
uses: crazy-max/ghaction-import-gpg@v6
3620
id: import_gpg
37-
with:
38-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
39-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
21+
uses: paultyng/ghaction-import-gpg@v2.1.0
22+
env:
23+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
4025

4126
- name: Run GoReleaser
42-
uses: goreleaser/goreleaser-action@v6.2.1
27+
uses: goreleaser/goreleaser-action@v6
4328
with:
4429
version: latest
45-
args: release --rm-dist
30+
args: release --clean
4631
env:
4732
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
4833
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)