Skip to content

Commit a01098e

Browse files
committed
ci: use go-version-file as single source of truth for Go version
Removes single-element go-version matrix from lint/test jobs in ci.yml and updates release.yml and sync-openapi.yml to all read from .go-version.
1 parent 4daa76d commit a01098e

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@ permissions:
1414
jobs:
1515
lint:
1616
name: Lint
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
go-version: ['1.26']
2117
runs-on: ubuntu-latest
2218
steps:
2319
- uses: actions/checkout@v6
2420

2521
- name: Set up Go
2622
uses: actions/setup-go@v6
2723
with:
28-
go-version: ${{ matrix.go-version }}
24+
go-version-file: .go-version
2925
cache: true
3026
cache-dependency-path: go.sum
3127

@@ -40,18 +36,14 @@ jobs:
4036

4137
test:
4238
name: Test
43-
strategy:
44-
fail-fast: false
45-
matrix:
46-
go-version: ['1.26']
4739
runs-on: ubuntu-latest
4840
steps:
4941
- uses: actions/checkout@v6
5042

51-
- name: Set up Go ${{ matrix.go-version }}
43+
- name: Set up Go
5244
uses: actions/setup-go@v6
5345
with:
54-
go-version: ${{ matrix.go-version }}
46+
go-version-file: .go-version
5547
cache: true
5648
cache-dependency-path: go.sum
5749

@@ -73,15 +65,14 @@ jobs:
7365
fail-fast: false
7466
matrix:
7567
os: [ubuntu-latest, windows-latest, macos-latest]
76-
go-version: ['1.26']
7768
runs-on: ${{ matrix.os }}
7869
steps:
7970
- uses: actions/checkout@v6
8071

81-
- name: Set up Go ${{ matrix.go-version }}
72+
- name: Set up Go
8273
uses: actions/setup-go@v6
8374
with:
84-
go-version: ${{ matrix.go-version }}
75+
go-version-file: .go-version
8576
cache: true
8677
cache-dependency-path: go.sum
8778

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v6
1919
with:
20-
go-version: "1.26"
20+
go-version-file: .go-version
2121
- name: Generate release notes from CHANGELOG.md
2222
id: notes
2323
run: |

0 commit comments

Comments
 (0)