Skip to content

Commit

Permalink
Merge pull request #47 from cli/andyfeller/46-go-mod-support
Browse files Browse the repository at this point in the history
Add go.mod support
  • Loading branch information
andyfeller committed Oct 27, 2023
2 parents b2a64f6 + 18f2a52 commit b0da21c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ inputs:
description: "GitHub token to use, defaults to `github.token` if unspecified"
go_version:
description: "The Go version to use for compiling (supports semver spec and ranges)"
default: "1.18"
go_version_file:
description: Path to the go.mod or go.work file to determine version of go to use
gpg_fingerprint:
description: "GPG fingerprint to use for signing releases"
release_tag:
Expand All @@ -25,7 +26,13 @@ runs:
# TODO: figure out how to avoid setting up Go for non-Go extensions
- uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go_version }}
# The default go version is managed here because actions/setup-go favors go-version over go-version-file,
# requiring us to only pass it if no other inputs are provided.
#
# Otherwise, we pass along the values given, letting the user catch the warning notice in the logs
# and picking either go-version or go-version-file.
go-version: ${{(inputs.go_version_file == '' && inputs.go_version == '') && '1.18' || inputs.go_version}}
go-version-file: ${{inputs.go_version_file}}

- id: determine_token
run: |
Expand Down

0 comments on commit b0da21c

Please sign in to comment.