-
Notifications
You must be signed in to change notification settings - Fork 56
Description
setup-go supports setting the Go version from the go.mod file; for Go 1.20 and older, it'll use the latest cached patch version on the same minor version, and for Go 1.21+, it'll use the exact version from go.mod, which now also includes the patch version.
Would it be possible to expose the go-version-file input in gh-extension-precompile as well? I previously extracted the Go version in a separate run step with go mod edit -json | jq -r '.Go', but that breaks if go.mod uses 1.21.0 or later, since the default Go on Actions runners, 1.20.8, considers the go.mod incorrectly formatted. I now use awk, which is less robust, but it would be nice to just leverage the existing setup-go functionality.
Happy to create a PR for this if there's interest, potentially including the check-latest flag from setup-go as well.