Skip to content

Add go-version-file input

Compare
Choose a tag to compare
@dmitry-shibanov dmitry-shibanov released this 12 May 10:59
· 143 commits to main since this release
fcdc436

Adding Go version file support

In scope of this release we add the go-version-file input. The new input (go-version-file) provides functionality to specify the path to the file containing Go version with such behaviour:

  • If the file does not exist the action will throw an error.
  • If you specify both go-version and go-version-file inputs, the action will use value from the go-version input and throw the following warning: Both go-version and go-version-file inputs are specified, only go-version will be used.
  • For now the action supports .go-version and go.mod files.
steps:
 - uses: actions/checkout@v3
 - uses: actions/setup-go@v3
   with:
     go-version-file: 'path/to/go.mod'
 - run: go version

Besides, the following pull requests included in this release:

  • Fix condition for GOPATH output #221
  • Added go-version output #85
  • Do not export GOROOT for Go versions >= 1.9 #175
  • Update @zeit/ncc to @vercel/ncc #229