File tree 2 files changed +19
-11
lines changed
2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -5,28 +5,35 @@ name: goreleaser
5
5
6
6
on :
7
7
workflow_dispatch :
8
- inputs :
9
- prerelease :
10
- description : If set, publish this as a release candidate / prerelease version.
11
- type : boolean
12
- required : true
13
8
14
9
jobs :
15
10
release :
11
+ permissions :
12
+ contents : read
16
13
runs-on : ubuntu-latest
17
14
steps :
18
15
- name : Checkout
19
16
uses : actions/checkout@v4
20
- with :
21
- fetch-depth : 0
22
17
- name : Set up Go
23
18
uses : actions/setup-go@v5
24
19
with :
25
- go-version : 1.20
20
+ go-version : " 1.20"
21
+ - name : Extract version
22
+ id : extract_version
23
+ # env:
24
+ # # Fake Git authorship information to try to make git tag happy.
25
+ # GIT_AUTHOR_NAME: "go-jsonnet-releaser"
26
+ # GIT_AUTHOR_EMAIL: "[email protected] "
27
+ run : |
28
+ CMD_VERSION="$(go run ./cmd/jsonnet --version | grep -oe 'v[0-9][0-9a-z.-]*$')" &&
29
+ printf "Extracted jsonnet version: %s\n" "${CMD_VERSION}" &&
30
+ git tag "${CMD_VERSION}" &&
31
+ printf "jsonnet_version='%s'\n" "${CMD_VERSION}" >> "${GITHUB_OUTPUT}"
26
32
- name : Run GoReleaser
27
33
uses : goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
34
+ env :
35
+ PROPOSED_VERSION : " ${{ steps.extract_version.outputs.jsonnet_version }}"
36
+ GITHUB_TOKEN : " ${{ github.token }}"
28
37
with :
29
38
version : latest
30
- args : release --rm-dist
31
- env :
32
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ args : release --clean
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ checksum:
96
96
release :
97
97
draft : true
98
98
skip_upload : false
99
+ target_commitish : " {{ .Env.PROPOSED_VERSION }}"
99
100
100
101
nfpms :
101
102
- id : jsonnet
You can’t perform that action at this time.
0 commit comments