Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions docs/releasezri/integrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.