How to Use
Add ReleaseZri to your project with the following steps.
Create a changelog#
ReleaseZri doesn't extract release notes from commit messages since that approach doesn't give meaningful
release notes. It extracts release notes from CHANGELOG.md file in your repository. Create changelog with
the following format.
There are no strict rules. You only need to use ## Unreleased for unreleased changes and
level 3 (###) or below headings for changes. You can update this changelog manually whenever you need regardless of
what you commit.
Create a release note template#
ReleaseZri generates release notes and embeds to a template. Now add your template to .releasezri/template.md
, as shown below.
Supported template variables#
- RZ_VERSION: New version number, Eg:- 3.2.0. This doesn't contain- v, so if you need- vprefix, you have to use- vbefore this template variable.
- RZ_CHANGELOG: Generated release notes markdown. Release notes is extracted from your- CHANGELOG.md.
- RZ_RZVERSION: ReleaseZri script version.
- RZ_DATE: System date in- yyyy-mm-ddformat.
- RZ_TIME: System time in- hh:mm:ssformat.
Add the release note generation script#
Copy-paste scripts/rz.py into your project.
Update your DevOps workflow#
When you run rz.py create <version>, it will generate release notes to .tmprz/release_notes.md. Also,
it will update CHANGELOG.md by adding the new version. You can run rz.py cleanup to remove
the .tmprz directory after using the generated release note.
You can use this release note generation script locally or with any DevOps pipleline. For example, see how to integrate ReleaseZri with GitHub Actions.
Add a workflow step to create release notes.
Add another step to commit and push changelog's updates.
Finally, publish your release with notes and artifacts.
See a complete workflow here. The ReleaseZri project itself maintains release notes with ReleaseZri. See its workflow here.
If you need to learn more about DevOps practices and why we built ReleaseZri you can read this article.