Commit 97bf79a 1 parent 59922f4 commit 97bf79a Copy full SHA for 97bf79a
File tree 1 file changed +27
-12
lines changed
1 file changed +27
-12
lines changed Original file line number Diff line number Diff line change
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
+ #
1
12
name : release
2
13
on :
3
- workflow_dispatch :
4
-
14
+ push :
15
+ tags :
16
+ - " v*"
17
+ permissions :
18
+ contents : write
5
19
jobs :
6
20
goreleaser :
7
21
runs-on : ubuntu-latest
8
22
steps :
9
23
- name : Checkout
10
24
uses : actions/checkout@v3
11
- with :
12
- fetch-depth : 0
13
25
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
16
30
with :
17
- go-version : " 1.21"
31
+ go-version-file : " go.mod"
32
+ cache : true
18
33
19
34
- name : Import GPG key
35
+ uses : crazy-max/ghaction-import-gpg@v5
20
36
id : import_gpg
21
-
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 }}
25
40
26
41
- name : Run GoReleaser
27
- uses : goreleaser/goreleaser-action@v2
42
+ uses : goreleaser/goreleaser-action@v4.2.0
28
43
with :
29
44
version : latest
30
45
args : release --rm-dist
You can’t perform that action at this time.
0 commit comments