Skip to content

Commit

Permalink
Use latest stable version of Go (#1348)
Browse files Browse the repository at this point in the history
Problem: Since Go changed the versioning in go.mod to specify a patch
release in 1.21, we don't use the latest go version when building the
binary anymore.
Before with 1.20 in go.mod we would use the latest version of 1.20.x,
but now since we specify 1.21.3 in go.mod we use that fixed version
and not 1.21.4 for example, and future updates.

Solution: Update the pipeline to always use the latest stable version of
Go in the pipeline.
  • Loading branch information
lucacome authored Dec 7, 2023
1 parent 041f24f commit 0f44f43
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable

- name: Output Variables
id: vars
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable

- name: Run Tests
run: make unit-test
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable

- name: Create/Update Draft
uses: lucacome/draft-release@785af55296512c907875513e397320ae3f1306bb # v1.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable
if: matrix.language == 'go'

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable

- name: Set GOPATH
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Golang Environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
go-version: stable

- name: Lint Code
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
Expand Down

0 comments on commit 0f44f43

Please sign in to comment.