Skip to content

Commit 5fa3b11

Browse files
committed
Managed by Terraform: Update release.yml github workflow
1 parent e70b366 commit 5fa3b11

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,44 @@
1010
# in `goreleaser` to indicate this is being used in a non-interactive mode.
1111
#
1212
name: release
13+
permissions:
14+
contents: write
1315
on:
1416
push:
1517
tags:
1618
- 'v*'
1719
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
1831
goreleaser:
32+
needs:
33+
- get-go-version
1934
runs-on: ubuntu-latest
2035
steps:
2136
- name: Checkout
22-
uses: actions/checkout@v2
37+
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
2338
- name: Unshallow
2439
run: git fetch --prune --unshallow
2540
- name: Set up Go
26-
uses: actions/setup-go@v2
41+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
2742
with:
28-
go-version: 1.18
43+
go-version: ${{ needs.get-go-version.outputs.go-version }}
2944
- name: Describe plugin
3045
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"
3247
- name: Install signore
3348
uses: hashicorp/setup-signore-package@v1
34-
3549
- name: Run GoReleaser
36-
uses: goreleaser/goreleaser-action@v2
50+
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
3751
with:
3852
version: latest
3953
args: release --rm-dist

0 commit comments

Comments
 (0)