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 containv, so if you needvprefix, you have to usevbefore this template variable.RZ_CHANGELOG: Generated release notes markdown. Release notes is extracted from yourCHANGELOG.md.RZ_RZVERSION: ReleaseZri script version.RZ_DATE: System date inyyyy-mm-ddformat.RZ_TIME: System time inhh: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.
Check for unreleased changes (optional)#
Before creating a release, you may want to confirm there are actually unreleased changes to avoid
publishing an empty release. Run rz.py check, which prints ST_HAS_CHANGES or ST_NO_CHANGES
depending on whether the Unreleased section in CHANGELOG.md has content.
Send a pull request with the changelog updates. We no longer commit directly to the default branch — instead, a dedicated branch is created and a pull request is opened, so the change can be reviewed before merging.
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.