From 411f3f79e1e7b1dec2a0ce86597315f76bef0cf1 Mon Sep 17 00:00:00 2001 From: subhu339 Date: Fri, 14 Aug 2026 12:25:33 +0530 Subject: [PATCH] docs: add releasezri check command workflow documentation --- docs/releasezri/integrate.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/docs/releasezri/integrate.md b/docs/releasezri/integrate.md index e5dc245..767be7b 100644 --- a/docs/releasezri/integrate.md +++ b/docs/releasezri/integrate.md @@ -53,7 +53,6 @@ have to use `v` before this template variable. - `RZ_DATE`: System date in `yyyy-mm-dd` format. - `RZ_TIME`: System time in `hh:mm:ss` format. - ## Add the release note generation script Copy-paste [`scripts/rz.py`](https://github.com/codezri/releasezri/blob/main/scripts/rz.py) into your project. @@ -76,6 +75,26 @@ Add a workflow step to create release notes. ./scripts/rz.py create ${{github.event.inputs.version}} ``` +## 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. + +```yaml +- name: Check for unreleased changes + id: check + run: | + chmod +x ./scripts/rz.py + echo "status=$(./scripts/rz.py check)" >> $GITHUB_OUTPUT + +- name: Stop if no changes + if: steps.check.outputs.status == 'ST_NO_CHANGES' + run: | + echo "No unreleased changes found." + exit 1 +``` + Add another step to commit and push changelog's updates. ```yaml @@ -92,13 +111,12 @@ Finally, publish your release with notes and artifacts. ```yaml - name: Create a GitHub release - uses: ncipollo/release-action@v1 - with: - tag: v${{github.event.inputs.version}} - name: Neutralinojs v${{github.event.inputs.version}} released! - bodyFile: ./.tmprz/release_notes.md - artifacts: './bin/neutralinojs-v${{github.event.inputs.version}}.zip' - draft: true + run: | + gh release create v${{github.event.inputs.version}} \ + --title "Neutralinojs v${{github.event.inputs.version}} released!" \ + --notes-file ./.tmprz/release_notes.md + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` See a complete workflow @@ -107,4 +125,4 @@ The ReleaseZri project itself maintains release notes with ReleaseZri. See its workflow [here](https://github.com/codezri/releasezri/blob/main/.github/workflows/create-release.yml). If you need to learn more about DevOps practices and why we built ReleaseZri you can read -[this](https://codezri.org/blog/how-we-save-our-time-with-devops) article. +[this](https://codezri.org/blog/how-we-save-our-time-with-devops) article. \ No newline at end of file