Skip to content

Commit 69e17f6

Browse files
authored
Update GHA setup-go to pull version from go.mod file (temporalio#5207)
## What changed? <!-- Describe what has changed in this PR --> Github actions that use `setup-go`, changed to pull the Go version from `go.mod` file. ## Why? <!-- Tell your future self why have you made these changes --> Less manual change to Go version when upgrading. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> Run locally. ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
1 parent 1a37cd4 commit 69e17f6

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
name: lint
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/setup-go@v4
12-
with:
13-
go-version: "1.21"
14-
check-latest: true
15-
1611
- uses: actions/checkout@v4
1712
with:
1813
fetch-depth: 0
1914

15+
- uses: actions/setup-go@v4
16+
with:
17+
go-version-file: 'go.mod'
18+
check-latest: true
19+
2020
- name: golangci-lint
2121
uses: golangci/golangci-lint-action@v3
2222
with:

.github/workflows/goreleaser.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: goreleaser
2+
23
on:
34
release:
45
types:
56
- released
7+
8+
permissions:
9+
contents: write
10+
611
jobs:
712
goreleaser:
813
runs-on: ubuntu-latest
@@ -11,11 +16,13 @@ jobs:
1116
uses: actions/checkout@v4
1217
with:
1318
fetch-depth: 0
19+
1420
- name: Set up Go
1521
uses: actions/setup-go@v4
1622
with:
17-
go-version: "1.21"
23+
go-version-file: 'go.mod'
1824
check-latest: true
25+
1926
- name: Run GoReleaser
2027
uses: goreleaser/goreleaser-action@v5
2128
with:

.github/workflows/trigger-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
id: get_branch
2121
run: |
2222
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
23-
23+
2424
- name: Generate a token
2525
id: generate_token
2626
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92

0 commit comments

Comments
 (0)