Skip to content

chore: get go version file for workflows from go.mod#130

Merged
jmeridth merged 1 commit intomainfrom
jm_get_go_version_from_go_mod_file
Sep 26, 2025
Merged

chore: get go version file for workflows from go.mod#130
jmeridth merged 1 commit intomainfrom
jm_get_go_version_from_go_mod_file

Conversation

@jmeridth
Copy link
Member

@jmeridth jmeridth commented Sep 25, 2025

Goreleaser will fail if we do not use the version we use in go.mod this solution is the best in case we upgrade the version in go.mod again and forget to update the workflow or Dependabot misses it to.

Docs

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this Sep 25, 2025
@jmeridth jmeridth requested a review from a team as a code owner September 25, 2025 23:13
Copilot AI review requested due to automatic review settings September 25, 2025 23:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates GitHub workflow files to derive the Go version from go.mod instead of hardcoding it in the workflow configurations. This ensures consistency between the Go version used in the project and the workflows, preventing potential build failures in GoReleaser and other tools.

  • Replace hardcoded Go versions with go-version-file: go.mod parameter
  • Update CI, lint, and release workflows to use consistent Go version sourcing
  • Eliminate manual version maintenance across multiple workflow files

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Replace hardcoded Go version 1.24 with go-version-file: go.mod
.github/workflows/lint.yml Replace go-version: stable with go-version-file: go.mod
.github/workflows/ci.yml Replace hardcoded Go version ^1.23.4 with go-version-file: go.mod in both jobs

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jmeridth jmeridth merged commit 86bbca9 into main Sep 26, 2025
7 checks passed
@jmeridth jmeridth deleted the jm_get_go_version_from_go_mod_file branch September 26, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants