Skip to content

Commit 704f46f

Browse files
committed
workflows: use go version specified in 'go.mod'
Update the workflows that build the project to use the fixed version of Go tied to the project in 'go.mod'. The 'go.mod' can be used as the sole source of truth on the supported version of Go in the repository, making it easier to upgrade and use new features when needed. Signed-off-by: Victoria Dye <[email protected]>
1 parent 9c7860f commit 704f46f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- name: Setup Go
11-
uses: actions/setup-go@v3
12-
with:
13-
go-version: '1.19.0'
14-
1510
- uses: actions/checkout@v3
1611
with:
1712
path: src/git-bundle-server
1813

14+
- name: Setup Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version-file: 'src/git-bundle-server/go.mod'
18+
1919
# TODO: when the '-C' option is available, remove the 'cd ...'
2020
# See https://github.com/golang/go/issues/50332 for more details
2121
- name: Build

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ jobs:
4646
environment: ${{matrix.jobs.environment}}
4747
runs-on: ${{matrix.jobs.pool}}
4848
steps:
49+
- name: Clone repository
50+
uses: actions/checkout@v3
4951
- name: Setup Go
5052
uses: actions/setup-go@v3
5153
with:
52-
go-version: '1.19.0'
54+
go-version-file: 'go.mod'
5355
- uses: ruby/setup-ruby@v1
5456
with:
5557
ruby-version: '3.2.1'
5658
- run: gem install asciidoctor
57-
- name: Clone repository
58-
uses: actions/checkout@v3
5959
- name: Configure MacOS signing
6060
if: ${{ matrix.jobs.pool == 'macos-latest' }}
6161
env:

0 commit comments

Comments
 (0)