Closed marccampbell closed 3 years ago
Hi @marccampbell
thanks for opening this feature request.
my understanding is we dont make PR for pre-releases already.
https://github.com/rajatjindal/krew-release-bot/blob/master/pkg/source/actions/action_runner.go#L59
can you point me to an execution which is a pre-release and opened PR, i can try to debug why that happened.
Thanks! I was afraid to test it out and get a krew release on my pre-release tag. This is great.
This is a feature request.
The bot should be able to not push to krew on prerelease tags.
Goreleaser has a setting that can optionally make the GitHub release a prerelease based on either a parameter or the tag name. Right now, the bot doesn't have matching logic, and the Goreleaser action doesn't have an output to determine if it was a prerelease. There are ways to handle this today, but all of them have some drawbacks:
Use a separate workflow I don't need to use a separate workflow for goreleaser, so making the krew-release-bot a separate workflow is difficult.
Add an if step to the workflow, something roughly like:
That's a little tricky because that regex in the example is super raw. We could look at the goreleaser source to get the right pattern, and that solves it for the case where goreleaser.yml has
prerelease: auto
.I propose a cleaner solution, where the krew-release-bot can query the release, and if it's a prerelease, it won't execute. There could be a variable in the action to always release, even on prereleases, if necessary. But I believe that the default should be for the krew-release-bot to ignore prerelease tags.