(This document is intended for maintainers of Krew only.)
-
Build krew reelase assets locally:
hack/make-all.sh
-
Try krew installation on each platform:
krew=out/bin/krew-darwin_amd64 # assuming macOS KREW_ROOT="$(mktemp -d)" KREW_OS=darwin \ $krew install --manifest=out/krew.yaml --archive=out/krew.tar.gz && \ KREW_ROOT="$(mktemp -d)" KREW_OS=linux \ $krew install --manifest=out/krew.yaml --archive=out/krew.tar.gz && \ KREW_ROOT="$(mktemp -d)" KREW_OS=windows \ $krew install --manifest=out/krew.yaml --archive=out/krew.zip
Krew follows Semantic Versioning 2.0.0.
Krew tags versions starting with v
. Example: v0.2.0-rc.1
.
-
Decide on a version number: set it to
$TAG
variable:TAG=v0.2.0-rc.1 # <- change this
-
Update installation instructions: Version number is hardcoded in
README.md
. -
Commit the changes back:
git commit -am "Release ${TAG:?TAG required}"
-
Tag the release:
release_notes="$(TAG=$TAG hack/make-release-notes.sh)" git tag -a "${TAG:?TAG required}" -m "${release_notes}"
-
Verify the release instructions:
git show "${TAG:?TAG required}"
-
Push the tag:
git push --follow-tags
Due to branch restrictions on GitHub preventing pushing to a branch directly, this command may require
-f
. -
Verify on Releases tab on GitHub
-
Make the new version available on krew index: Copy the
krew.yaml
from the release artifacts and make a pull request to krew-index repository. This will make the plugin available to upgrade for users using older versions of krew.
When a release is tagged, the Build Trigger configured on Google Cloud Build
will pick up the hack/cloudbuild-release.yaml
, build the release artifacts,
and upload them to Google Cloud Storage bucket gs://krew/${TAG}/
automatically.
The last tagged release will also be available under gs://krew/latest/
Similarly, another Build Trigger configured on GCB builds each commit merged
to master
and pushes the artifacts to gs://krew/builds/{short_commit_sha}
.
The Google Cloud Storage bucket gs://krew
is hosted in
google-samples
GCP project. This bucket is publicly viewable/listable.
If there's custom action needed (e.g. re-tagging a release), use gsutil
tool or Google Cloud Console to modify this bucket.