Skip to content

go-version-file enforces the minimum required Go version instead of opting for the maximum allowed one #561

Open
@azazeal

Description

@azazeal

Given the following go.mod & setup-go configurations:

module github.com/actions/setup-go/example

go 1.23.3
- name: Setup Go
  uses: actions/setup-go
  with:
    go-version-file: go.mod

the action would determine, today, that the version of Go it should setup is 1.23.3, instead of 1.24.0, which is the latest available Go version matching the go constraint the author opted for, as explained by the go directive documentation here:

go minimum-go-version

minimum-go-version
The minimum version of Go required to compile packages in this module.

Perhaps there's good reason as to why the action determines the version as it does today, and if that's the case please let me know, but I think that, when go-version-file is used, the action should opt for the greatest available Go version matching the author's specification (perhaps only in cases where check-latest is set), instead of opting for the provided minimum required version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions