Skip to content

Commit 867dbb6

Browse files
authored
chg: update CI release workflow
1 parent 158b743 commit 867dbb6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,20 @@ on:
1515
tags:
1616
- 'v*'
1717
jobs:
18+
get-go-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
go-version: ${{ steps.get-go-version.outputs.go-version }}
22+
steps:
23+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
24+
- name: 'Determine Go version'
25+
id: get-go-version
26+
run: |
27+
echo "Found Go $(cat .go-version)"
28+
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
1829
goreleaser:
30+
needs:
31+
- get-go-version
1932
runs-on: ubuntu-latest
2033
steps:
2134
- name: Checkout
@@ -25,10 +38,10 @@ jobs:
2538
- name: Set up Go
2639
uses: actions/setup-go@v2
2740
with:
28-
go-version: "1.20"
41+
go-version: ${{ needs.get-go-version.outputs.go-version }}
2942
- name: Describe plugin
3043
id: plugin_describe
31-
run: echo "name=api_version::$(go run . describe | jq -r '.api_version')" >> $GITHUB_OUTPUT
44+
run: echo "api_version=$(go run . describe | jq -r '.api_version')" >> $GITHUB_OUTPUT
3245
- name: Import GPG key
3346
id: import_gpg
3447
uses: crazy-max/[email protected]

0 commit comments

Comments
 (0)