Skip to content

Commit 508b037

Browse files
authored
Update release.yml (#100)
Signed-off-by: Astha Jain <[email protected]>
1 parent 996f8ed commit 508b037

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This GitHub action can publish assets for release when a tag is created.
22
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
33
#
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 `GPG_PASSPHRASE`
4+
# This uses an action (crazy-max/ghaction-import-gpg) that assumes you set your
5+
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
66
# secret. If you would rather own your own GPG handling, please fork this action
77
# or use an alternative one for key handling.
88
#
@@ -18,29 +18,37 @@ jobs:
1818
goreleaser:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v3
23-
- name: Unshallow
21+
-
22+
name: Checkout
23+
uses: actions/[email protected]
24+
-
25+
name: Unshallow
2426
run: git fetch --prune --unshallow
25-
- name: Set up Go
27+
-
28+
name: Set up Go
2629
uses: actions/setup-go@v4
2730
with:
28-
go-version: 1.17
29-
- name: Describe plugin
31+
go-version: 1.18
32+
-
33+
name: Describe plugin
3034
id: plugin_describe
3135
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
32-
- name: Import GPG key
36+
-
37+
name: Import GPG key
3338
id: import_gpg
34-
uses: crazy-max/ghaction-import-gpg@v5
39+
uses: crazy-max/ghaction-import-gpg@v5.3.0
3540
with:
41+
# These secrets will need to be configured for the repository:
3642
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
37-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
38-
- name: Run GoReleaser
43+
passphrase: ${{ secrets.PASSPHRASE }}
44+
-
45+
name: Run GoReleaser
3946
uses: goreleaser/goreleaser-action@v4
4047
with:
4148
version: latest
42-
args: release --rm-dist
49+
args: release --clean
4350
env:
4451
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
52+
# GitHub sets this automatically
4553
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4654
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}

0 commit comments

Comments
 (0)