(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 --tmpdir krew-XXXXXXXXXX)" KREW_OS=darwin \ $krew install --manifest=out/krew.yaml --archive=out/krew.tar.gz && \ KREW_ROOT="$(mktemp -d --tmpdir krew-XXXXXXXXXX)" KREW_OS=linux \ $krew install --manifest=out/krew.yaml --archive=out/krew.tar.gz && \ KREW_ROOT="$(mktemp -d --tmpdir krew-XXXXXXXXXX)" KREW_OS=windows \ $krew install --manifest=out/krew.yaml --archive=out/krew.tar.gz
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.3.2-rc.1 # <- change this
-
Create a release commit:
git commit -am "Release ${TAG:?TAG required}" --allow-empty
-
Push PR and merge changes: The repository hooks forbid direct pushes to master, so the changes from the previous step need to be pushed and merged as a regular PR.
git push origin master
(Only repository administrators can directly push to master branch.)
-
Wait until the build succeeds: Wait for CI to show green for the build of the commit you just pushed to master branch.
-
Tag the release:
git fetch origin git reset --hard origin/master # when the previous merge is done 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 origin "${TAG:?TAG required}"
-
Verify on Releases tab on GitHub: Make sure
krew.yaml
,krew.tar.gz
and other release assets show up on "Releases" tab. -
Make the new version available on krew index: Get the latest
krew.yaml
fromcurl -LO https://github.com/kubernetes-sigs/krew/releases/download/"${TAG:?TAG required}"/krew.yaml
and make a pull request to krew-index repository. This will make the plugin available to upgrade for users using older versions of krew.
-
Update krew-index CI: The CI tests for
krew-index
repository relies on tools from mainkrew
repository, and they should use the latest version. When there's a new version, update the.travis.yml
inkrew-index
repo.
When a tag is pushed to the repository, GitHub workflow will make a release on GitHub, and upload the release artifacts as files on the release.