Skip to content

Commit 97bf79a

Browse files
committed
Updated release
1 parent 59922f4 commit 97bf79a

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

.github/workflows/release.yaml

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,45 @@
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+
#
112
name: release
213
on:
3-
workflow_dispatch:
4-
14+
push:
15+
tags:
16+
- "v*"
17+
permissions:
18+
contents: write
519
jobs:
620
goreleaser:
721
runs-on: ubuntu-latest
822
steps:
923
- name: Checkout
1024
uses: actions/checkout@v3
11-
with:
12-
fetch-depth: 0
1325

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

1934
- name: Import GPG key
35+
uses: crazy-max/ghaction-import-gpg@v5
2036
id: import_gpg
21-
uses: paultyng/[email protected]
22-
env:
23-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24-
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
37+
with:
38+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
39+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
2540

2641
- name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v2
42+
uses: goreleaser/goreleaser-action@v4.2.0
2843
with:
2944
version: latest
3045
args: release --rm-dist

0 commit comments

Comments
 (0)