This document describes how to release a new version of Mantle.
Follow semantic versioning 2.0.0 to choose the new version number.
In the release procedure for both the app and Helm Chart, the release note is generated automatically, and then it is edited manually. In this step, PRs should be classified based on Keep a CHANGELOG.
The result should look something like:
## What's Changed
### Added
* Add a notable feature for users (#35)
### Changed
* Change a behavior affecting users (#33)
### Removed
* Remove a feature, users action required (#39)
### Fixed
* Fix something not affecting users or a minor change (#40)
-
Determine a new version number by checking the differences since the last release. Then, define the
VERSION
variable.VERSION=1.2.3
-
Add a new tag and push it.
git switch main git pull git tag v${VERSION} git push origin v${VERSION}
-
Once a new tag is pushed, GitHub Actions automatically creates a draft release note for the tagged version.
Visit https://github.com/cybozu-go/mantle/releases to check the result.
-
Edit the auto-generated release note and remove PRs which contain changes only to the helm chart. Then, publish it.
Mantle Helm Chart can be released independently.
This prevents the Mantle version from going up just by modifying the Helm Chart.
Also, the Helm Charts mantle
and mantle-cluster-wide
can be released independently.
If you want to release both charts, please follow the instructions for each of them.
-
Determine a new version number. Then, define
APPVERSION
andCHARTVERSION
variables:APPVERSION=1.2.3 CHARTVERSION=4.5.6
-
Make a branch for the release as follows:
git switch main git pull # For charts/mantle git switch -c bump-mantle-chart-${CHARTVERSION} # For charts/mantle-cluster-wide git switch -c bump-mantle-cluster-wide-chart-${CHARTVERSION}
-
Update versions in the
Chart.yaml
file.# For charts/mantle sed -r -i "s/appVersion: \"[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\"/appVersion: \"${APPVERSION}\"/g" charts/mantle/Chart.yaml sed -r -i "s/^version: [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/version: ${CHARTVERSION}/g" charts/mantle/Chart.yaml # For charts/mantle-cluster-wide sed -r -i "s/appVersion: \"[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\"/appVersion: \"${APPVERSION}\"/g" charts/mantle-cluster-wide/Chart.yaml sed -r -i "s/^version: [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/version: ${CHARTVERSION}/g" charts/mantle-cluster-wide/Chart.yaml
-
Commit the change and create a pull request:
# For charts/mantle git commit -a -s -m "Bump mantle chart version to ${CHARTVERSION}" git push --set-upstream origin bump-mantle-chart-${CHARTVERSION} # For charts/mantle-cluster-wide git commit -a -s -m "Bump mantle-cluster-wide chart version to ${CHARTVERSION}" git push --set-upstream origin bump-mantle-cluster-wide-chart-${CHARTVERSION}
-
Create a new pull request and merge it.
-
Manually run the GitHub Actions workflow for the release.
https://github.com/cybozu-go/mantle/actions/workflows/helm-release.yaml
When you run workflow, helm/chart-releaser-action will automatically create a GitHub Release for the updated chart.
-
Edit the auto-generated release notes as follows:
- Select the "Previous tag", which is in the form of "mantle-chart-vX.Y.Z" or "mantle-cluster-wide-chart-vX.Y.Z".
- Clear the textbox, and click "Generate release notes" button.
- Remove PRs which do not contain changes to the updated helm chart.