How to Use
Add ReleaseZri to your project with the following steps.
#
Create a changelogReleaseZri 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 templateReleaseZri generates release notes and embeds to a template. Now add your template to .releasezri/template.md
, as shown below.
#
Supported template variablesRZ_VERSION
: New version number, Eg:3.2.0
. This doesn't containv
, so if you needv
prefix, you have to usev
before 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-dd
format.RZ_TIME
: System time inhh:mm:ss
format.
#
Add the release note generation scriptCopy-paste scripts/rz.py
into your project.
#
Update your DevOps workflowWhen 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.