File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change 10
10
# in `goreleaser` to indicate this is being used in a non-interactive mode.
11
11
#
12
12
name : release
13
+ permissions :
14
+ contents : write
13
15
on :
14
16
push :
15
17
tags :
16
18
- ' v*'
17
19
jobs :
20
+ get-go-version :
21
+ runs-on : ubuntu-latest
22
+ outputs :
23
+ go-version : ${{ steps.get-go-version.outputs.go-version }}
24
+ steps :
25
+ - uses : actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
26
+ - name : ' Determine Go version'
27
+ id : get-go-version
28
+ run : |
29
+ echo "Found Go $(cat .go-version)"
30
+ echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
18
31
goreleaser :
32
+ needs :
33
+ - get-go-version
19
34
runs-on : ubuntu-latest
20
35
steps :
21
36
- name : Checkout
22
- uses : actions/checkout@v2
37
+ uses : actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
23
38
- name : Unshallow
24
39
run : git fetch --prune --unshallow
25
40
- name : Set up Go
26
- uses : actions/setup-go@v2
41
+ uses : actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
27
42
with :
28
- go-version : 1.18
43
+ go-version : ${{ needs.get-go-version.outputs.go-version }}
29
44
- name : Describe plugin
30
45
id : plugin_describe
31
- run : echo "::set-output name= api_version:: $(go run . describe | jq -r '.api_version')"
46
+ run : echo "api_version= $(go run . describe | jq -r '.api_version')" >> "$GITHUB_OUTPUT "
32
47
- name : Install signore
33
48
uses : hashicorp/setup-signore-package@v1
34
-
35
49
- name : Run GoReleaser
36
- uses : goreleaser/goreleaser-action@v2
50
+ uses : goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
37
51
with :
38
52
version : latest
39
53
args : release --rm-dist
You can’t perform that action at this time.
0 commit comments