cli / gh-extension-precompile

Action for publishing binary GitHub CLI extensions
MIT License
93 stars 41 forks source link

How to build with unstable pre-releases of Go #11

Closed skaldarnar closed 2 years ago

skaldarnar commented 2 years ago

I'm trying to build a little extension and (for whatever esoteric reason) would like to build with the 1.18beta1 version of Go. Is there a way to do that?

I found a paragraph in the docs of actions/setup-go that looks like it should in theory be possible to specify non-release versions:

  - uses: actions/setup-go@v2
    with:
      stable: 'false'
      go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use.

However, the corresponding part in this action only allows to set the go-version, but we cannot set the stable flag to false, can we?

https://github.com/cli/gh-extension-precompile/blob/b3199c540c5b863b00e24c36783ffdafa9bbc96b/action.yml#L20-L22

Would a fix be as simple as adding another input option and passing that through?

skaldarnar commented 2 years ago

Update: I took this journey further and was finally able to build my gh extension with Go 1.18beta1. See https://github.com/actions/setup-go/issues/177#issuecomment-997403495 for more details.

Would https://github.com/cli/gh-extension-precompile/commit/8c82798df7b77dbbb7ebdbd8986736f90d79c222 be an acceptable contribution?

mislav commented 2 years ago

@skaldarnar That looks like it would solve it; PR welcome! 🙇

mislav commented 2 years ago

https://github.com/cli/gh-extension-precompile/commit/f2ea312b185f4d8783cd039ee0494fbc06306812