Skip to content

Commit 0d01822

Browse files
authored
Use the go-version from the go-version job
1 parent 62b7245 commit 0d01822

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,18 @@ on:
1515
tags:
1616
- 'v*'
1717
jobs:
18+
go-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
go-version: ${{ steps.go-version.outputs.go-version }}
22+
steps:
23+
- uses: actions/checkout@v2
24+
# Read the .go-version file and output it for other jobs to use.
25+
- id: go-version
26+
run: echo "::set-output name=go-version::$(cat .go-version)"
1827
goreleaser:
1928
runs-on: ubuntu-latest
29+
needs: [go-version]
2030
steps:
2131
-
2232
name: Checkout
@@ -28,7 +38,7 @@ jobs:
2838
name: Set up Go
2939
uses: actions/setup-go@v2
3040
with:
31-
go-version: 1.14
41+
go-version: ${{ needs.go-version.outputs.go-version }}
3242
-
3343
name: Import GPG key
3444
id: import_gpg

0 commit comments

Comments
 (0)