Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(actions): update the go-version field to use a string instead of a number #530

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

Gearheads
Copy link
Collaborator

What this PR does / why we need it:
This PR will fix the issue within the goreleaser GitHub Action:

⨯ release failed after 0s                  error=hook failed: go mod download: exit status 2; output: go: unknown subcommand "mod"
Run 'go help' for usage.

Turns out there is a behavior with YAML where if we provide a number the YAML will be parsed to ignore the trailing zero. Therefore, instead of using Go1.20, the GitHub Action was using Go1.2:

Successfully set up Go version 1.2
##[add-matcher]/home/runner/work/_actions/actions/setup-go/v3/matchers.json
##[debug]Added matchers: 'go'. Problem matchers scan action output for known warning or error strings and report these inline.
go version go1.2.2 linux/amd64

I was able to confirm that other users ran into the same issue: actions/setup-go#326 (comment)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes # goreleaser 61

This branch can be deleted once it is merged.

… a number

Turns out there is an issue with YAML where if we provide a number the YAML will be parsed to ignore the trailing zero.

Signed-off-by: Casale, Robert <[email protected]>
@Gearheads Gearheads merged commit e082401 into main Jul 21, 2023
8 checks passed
@Gearheads Gearheads deleted the bugfix/wrong-go-version branch July 21, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants