Skip to content

Commit 87477d2

Browse files
authored
refactor: simplify go version in release workflow (#444)
Removed the separate job for reading the Go version from .'go-version 'and now use the 'go.mod' file directly. This streamlines the workflow and reduces complexity. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent a41a7a2 commit 87477d2

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,7 @@ permissions:
1313
packages: read
1414

1515
jobs:
16-
get-go-version:
17-
runs-on: ubuntu-latest
18-
outputs:
19-
go-version: ${{ steps.get-go-version.outputs.go-version }}
20-
steps:
21-
- name: Checkout Repository
22-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23-
- name: Get Go Version
24-
id: get-go-version
25-
run: |
26-
echo "Found Go $(cat .go-version)"
27-
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
2816
goreleaser:
29-
needs:
30-
- get-go-version
3117
runs-on: ubuntu-latest
3218
steps:
3319
- name: Checkout Repository
@@ -37,7 +23,7 @@ jobs:
3723
- name: Setup Go
3824
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3925
with:
40-
go-version: ${{ needs.get-go-version.outputs.go-version }}
26+
go-version-file: go.mod
4127
- name: Describe Plugin
4228
id: plugin_describe
4329
run: echo "api_version=$(go run . describe | jq -r '.api_version')" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)