ci(release): fix publishing krew plugin; add '.exe' extension to Windows binary #1140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fix publishing krew plugin in release CI
There's an error that stops it from getting the right tag, which is, a
needs: retag
is needed so that it can get the value from${{ needs.retag.outputs.NEW_TAG }}
:However, fixing that won't work still: https://github.com/HollowMan6/kubescape/actions/runs/4392160217/jobs/7691893332
As you can't override the
GITHUB_REF
variable due to GitHub Actions' limit, quoting from the GitHub Actions' documentation: "If you attempt to override the value of one of these default variables, the assignment is ignored."So I moved the Publish Krew plugin into a separate CI, which is triggered by exactly matching the tag created by the release CI. Also as events triggered by the GITHUB_TOKEN will not create a new workflow run, I changed the release token into the
secrets.GH_PERSONAL_ACCESS_TOKEN
.Test in my fork:
https://github.com/HollowMan6/kubescape/actions/runs/4392626675 results in PR: kubernetes-sigs/krew-index#3000
Then I fixed the
if:
check so that it won't get triggered in a fork.add '.exe' extension to Windows binary
Add '.exe' extension to Windows binaries, as Windows executables usually have
.exe
extension.