relnote docs · Compare · CHANGELOG.md · Changesets alternative · Python package · GitHub Action · Single-file zipapp
A towncrier alternative without news fragments
towncrier (PyPI package towncrier, 26.9.0 docs) builds a news file from news fragments. The 26.9.0 docs say it reads those fragments rather than Git history, so that people do not all write into one file. They name Twisted, pytest, pip, BuildBot, and attrs among the projects that use it. The command line tool requires Python. The same page says it is usable with any project type, as long as you do not use Python-specific affordances such as auto-detection of the project version. If the commits already follow conventional commits and you do not want a fragment file per change, relnote builds the Release body from the local git log: no newsfragments directory, no towncrier.toml, and no [tool.towncrier] table.
towncrier, or this?
Facts in this table are from the Towncrier 26.9.0 tutorial, command line reference, and configuration reference. The tutorial's install line is python3 -m pip install towncrier.
| towncrier 26.9.0 | relnote | |
|---|---|---|
| What it writes | A news file. The default filename is NEWS.rst. The tutorial says towncrier appends the built news to that file and puts the new version notes after the start string. The default start string is .. towncrier release notes start, or <!-- towncrier release notes start --> when filename ends with .md. Content above the marker stays. If there are no fragments, the CLI reference says a notice of "no significant changes" is added | A GitHub Release body on stdout, or --output. --changelog CHANGELOG.md inserts one Markdown section before the first ## heading. The command does not commit. It does not look for the towncrier start string |
| Where the text comes from | News fragment files, one per change. The tutorial's filename is an issue id, a type, and an optional suffix, such as 1234.bugfix or 3456.doc.rst. towncrier create writes a fragment. An orphan fragment starts with + (the default orphan_prefix). The docs also call fragments topfiles or newsfiles | Commit subjects since the previous tag. feat → Features, fix → Fixes, type! or a BREAKING CHANGE: footer → Breaking, anything else → Other. Merge commits are omitted unless you pass --include-merges. There is no fragment file |
| Default categories | The configuration reference lists feature, bugfix, doc, removal, and misc. The tutorial describes them as a new feature, a bug fix, a documentation improvement, a deprecation or removal of public API, and an issue that is not of interest to users. Its draft output uses the headings Bugfixes, Improved Documentation, Deprecations and Removals, and Misc. The tutorial says misc does not put the file contents in the news file. Custom types replace that list; you redefine any default you still want | Fixed headings from the commit type: Features, Fixes, Breaking, Other. There is no fragment-type config. A docs: commit is Other. A removal is Breaking only when the subject is type! or the footer contains BREAKING CHANGE: |
| Config | towncrier.toml or pyproject.toml, under [tool.towncrier]. If both exist, towncrier.toml takes precedence. --config FILE selects another file. The default fragment directory is newsfragments (inside the package when package is set). A Python project can set package and package_dir ("src" when the package lives there) | None. relnote does not read towncrier.toml or [tool.towncrier] |
| Version and date | The tutorial's order is --version, then the version key, then, for a Python project with package set, the installed package metadata or a __version__ in the package. It does not compute the next tag from commits. --date sets YYYY-MM-DD. SOURCE_DATE_EPOCH is the documented reproducible-build timestamp | relnote --next-version prints the next tag and does not create it: breaking → major, feat → minor, anything else → patch. While the major is 0, a breaking change bumps the minor. --changelog-title names the section. --date YYYY-MM-DD sets the section date (default: today, UTC) |
| What happens to the inputs | towncrier build is the default when no command is passed. Processed fragments are removed by default. For fragments already committed, git rm is used. --keep leaves them. --yes skips the confirmation (the CLI reference says this is useful for automated tasks). --draft prints fragments to stdout, does not write files, and does not check versions. The tutorial's production command stages the news file with git add and leaves the commit to you | Nothing is deleted and nothing is committed. --output notes.md --quiet writes the Release body and prints nothing. --changelog only edits the changelog file |
| Requiring a fragment | towncrier check checks that a feature branch adds at least one news fragment. The check is skipped when the news file itself is modified on the branch. The default comparison is origin/main, with a fallback to origin/master. --compare-with and --staged change that | No fragment check. A conventional commit in the range is the note. An empty range exits with status 1 (the step still succeeds in the GitHub Action unless fail-on-empty is set) |
| Runtime | A Python package. The 26.9.0 homepage says the CLI requires Python, and that it is usable with any project type on any platform if you do not use Python-specific version detection. The configuration reference's minimal non-Python file is a towncrier.toml that sets name | Python 3.11+ and git on PATH. No third-party packages. The same CLI reads a Python, Rust, or other repository. The notes come from local git |
| GitHub Release | The 26.9.0 tutorial and command line reference describe the news file. They do not describe creating a GitHub Release | The CLI does not create the Release. The Action guide does, with gh or softprops/action-gh-release. One step after a full checkout is loki-inu/relnote@v0.3.8 |
Keep towncrier when you want that curated fragment: the 26.9.0 homepage calls it news written for the people who hear it, separate from the developer log. Keep it when towncrier check should require a fragment on each branch, and when you want the Python integration those docs describe (version from package metadata or __version__, fragments in the package's newsfragments directory, [tool.towncrier] in pyproject.toml). Custom fragment types, sections, and templates are part of that config. The homepage also says towncrier works best where merges close an issue.
relnote fits when you do not want a fragment file per change and the commits are already conventional, including a squash-merged title such as feat: … (#12). That includes a repository that is not a Python package: towncrier can run there too, with name set and --version passed when the version cannot be detected, and the reason to switch is the fragment workflow. The CI form is one step, loki-inu/relnote@v0.3.8 after actions/checkout with fetch-depth: 0, or python3 -m relnote --output notes.md --quiet wherever Python 3.11+ and git are already installed. It is a poor fit when the note you want is a sentence that never appears in the commit subject: relnote never sees those fragment files.
Install
What you are leaving, from the 26.9.0 tutorial and command line reference:
python3 -m pip install towncrier
towncrier create 1234.bugfix.rst
towncrier build --draft
towncrier check
Python 3.11+ and git on PATH. The download is the v0.3.8 zipapp from the GitHub Release, the same pin as the single-file install. From a checkout, python3 -m relnote is the same CLI. pip install git+https://github.com/loki-inu/relnote.git is the other install on the offline release notes page. relnote does not read towncrier.toml or [tool.towncrier].
mkdir -p ~/.local/bin
curl -fsSL -o ~/.local/bin/relnote https://github.com/loki-inu/relnote/releases/download/v0.3.8/relnote
chmod +x ~/.local/bin/relnote
Release body, next version, CHANGELOG section
Three separate invocations, the same flags as the offline guide, the next version guide, and the CHANGELOG.md guide. Nothing is pushed, and no fragment file is read. --since REF starts somewhere other than the latest tag.
python3 -m relnote --next-version
python3 -m relnote --output notes.md --quiet
python3 -m relnote --changelog CHANGELOG.md --changelog-title v1.4.0 --quiet
--next-version prints one line, such as v1.4.0. --output notes.md --quiet writes the Release body and prints nothing. --changelog prepends one Markdown section. With --changelog-title v1.4.0 on an untagged HEAD, that section's compare link ends at v1.4.0 (v0.3.6+). Without --changelog-title, an untagged HEAD is titled Unreleased. The command does not commit the file, and it does not take --version as a towncrier version override: the section title is --changelog-title, and the suggested tag is --next-version.
What those commands write
Start: the last tag is v1.3.2, then feat: add --json output (#12) and fix: handle empty config (#13). --next-version prints v1.4.0 (a feat is a minor bump). notes.md is the Release body. Because HEAD is not tagged yet, the range ends at HEAD:
## What's changed
### Features
- add --json output (#12) (`4a5b395`) — Ada Lovelace
### Fixes
- handle empty config (#13) (`7e08d2c`) — Ada Lovelace
---
Range: `v1.3.2` → `HEAD`.
**Full changelog:** https://github.com/you/project/compare/v1.3.2...HEAD
CHANGELOG.md gains this section above the previous entries. (#12) becomes a pull request link when origin is a github.com remote (v0.3.5+):
## [v1.4.0] - 2026-11-20
### Features
- add --json output ([#12](https://github.com/you/project/pull/12)) (`4a5b395`) — Ada Lovelace
### Fixes
- handle empty config ([#13](https://github.com/you/project/pull/13)) (`7e08d2c`) — Ada Lovelace
**Full changelog:** https://github.com/you/project/compare/v1.3.2...v1.4.0
Both blocks come from running those three commands against a scratch repository in relnote's test suite (tests/test_towncrier_docs.py). Your hashes and the date differ. A squash-merged pull request whose title is already feat: … (#12) is one commit, so it shows up as one line. towncrier would list a fragment such as 12.feature instead, under that fragment type. Details: squash-merged PR titles.
Migration
- Install the zipapp above and pin it to
v0.3.8. Stop runningtowncrier buildandtowncrier checkin CI and locally. - If fragment files for this release are still in the tree, run
towncrieronce so the tutorial's production step folds them into the news file, or copy the sentences you still want. relnote does not read those files. - Leave the existing news file in the repo. relnote's
--changelogwrites a Markdown section (## [TITLE] - DATE) and does not look for.. towncrier release notes startor the Markdown comment. If the towncrier file isNEWS.rst, keep it as history and point--changelogat aCHANGELOG.md. If it is already Markdown with##headings, the next run inserts one section before the first of those headings. Older text stays. The command does notgit rmfragments and does not commit. - Remove the
towncrierdependency when nothing else imports it.towncrier.tomland[tool.towncrier]are unused after that. Delete the fragments directory once it no longer holds notes you need. - Publish the GitHub Release with the workflows on the Action guide, copied below. relnote still does not push.
A Python package that also wants the version in pyproject.toml bumped, the changelog section committed, and an annotated tag can use examples/release.sh. --dry-run prints the plan and writes nothing. Nothing in the script is pushed. Guide: Python package releases.
curl -fsSL -o release.sh https://raw.githubusercontent.com/loki-inu/relnote/v0.3.8/examples/release.sh
chmod +x release.sh
./release.sh --dry-run --bump-file pyproject.toml
./release.sh --bump-file pyproject.toml
That URL is examples/release.sh on the v0.3.8 tag. The v0.3.8 release assets are relnote, relnote.pyz, and SHA256SUMS, so the script is not a release asset. It calls relnote on PATH.
Draft a Release when the tag is pushed
This is the tag-push workflow from the GitHub Action guide and from examples/draft-release.yml. Copy it to .github/workflows/draft-release.yml. Push a tag such as v1.4.0 and a draft Release appears with the notes since the previous tag. You review it and press Publish. There is no towncrier build step and no news fragment to collect.
name: Draft release
on:
push:
tags:
- "v*"
jobs:
draft:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: relnote
uses: loki-inu/relnote@v0.3.8
- uses: softprops/action-gh-release@v2
with:
draft: true
name: ${{ github.ref_name }}
body: ${{ steps.relnote.outputs.notes }}
fetch-depth: 0 is required so the checkout has tags. contents: write is for the release step. The relnote step only reads the checkout. On a tag push, HEAD is the new tag, so the range and the compare link end at that tag (v0.3.4+), not at HEAD.
No third-party release action? The guide's GitHub CLI step passes the notes through the environment, not inline in the script (commit subjects contain backticks):
- run: gh release create "$GITHUB_REF_NAME" --draft --title "$GITHUB_REF_NAME" --notes "$NOTES"
env:
GH_TOKEN: ${{ github.token }}
NOTES: ${{ steps.relnote.outputs.notes }}
Or create the Release from a button
This is the workflow_dispatch job from the same guide. next-version is the tag. has-changes is false when there is nothing new, and the step still succeeds, so the gh step is gated on it. gh release create makes the tag at --target.
name: Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: relnote
uses: loki-inu/relnote@v0.3.8
- if: steps.relnote.outputs.has-changes == 'true'
run: gh release create "$TAG" --target "$GITHUB_SHA" --title "$TAG" --notes "$NOTES"
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ steps.relnote.outputs.next-version }}
NOTES: ${{ steps.relnote.outputs.notes }}
- if: steps.relnote.outputs.has-changes != 'true'
run: echo "Nothing to release since the last tag."
Set fail-on-empty: true if an empty range should fail the step. An unknown since ref still fails. Inputs and outputs: the Action guide.
Map the 26.9.0 commands
| towncrier 26.9.0 | relnote |
|---|---|
python3 -m pip install towncrier | The v0.3.8 zipapp above, or python3 -m relnote from a checkout |
towncrier create 1234.bugfix.rst | A commit subject such as fix: handle empty config (#13). No fragment file |
towncrier create +.feature.rst (orphan fragment; the issue id must not contain .) | No orphan file. The commit subject is the bullet |
towncrier or towncrier build (removes fragments by default, stages the news file, leaves the commit to you) | python3 -m relnote --changelog CHANGELOG.md --changelog-title v1.4.0. One new section. Older sections stay. Does not git rm or git add |
towncrier build --draft | python3 -m relnote prints the Release body. Nothing is written unless you pass --output or --changelog |
towncrier build --version 1.2.3 | --changelog-title v1.4.0 names the section. --next-version prints the next tag from the commits. towncrier does not compute that tag |
towncrier build --date 2018-01-01 | --date 2018-01-01 on a --changelog run. The default is today, UTC |
--yes and --keep | relnote does not prompt, and it does not delete fragment files |
towncrier check (default compare origin/main) | No equivalent. relnote does not require a fragment on the branch |
towncrier.toml or [tool.towncrier] in pyproject.toml | No config file. relnote does not read either file |
Default directory newsfragments, default file NEWS.rst | No fragment directory. --changelog FILE is the Markdown file. Stdout is the Release body unless you pass --output |
package and package_dir (version and fragment path for a Python package) | Not used for version detection. --path DIR limits commits to a directory. --tag-prefix PREFIX limits which tags count. Guide: monorepo |
FAQ
When should I keep towncrier?
Keep towncrier when you want a curated news fragment per change, written for people who use the software, when you want towncrier check to require a fragment on a branch, or when you want the Python package integration in the 26.9.0 docs: version from package metadata or __version__, fragments in the package newsfragments directory, and config in pyproject.toml. relnote does not read fragment files and does not check that a branch added one.
Does relnote read news fragments?
No. relnote reads commit subjects since the previous tag (or --since). towncrier 26.9.0 reads fragment files such as 1234.bugfix and, by default, removes the processed fragments on build. A fragment file is not an input to relnote.
Does relnote read towncrier.toml or pyproject.toml?
No. towncrier 26.9.0 reads towncrier.toml or pyproject.toml under [tool.towncrier]. If both exist, towncrier.toml takes precedence. relnote has no config file and does not read either one. --changelog-title names the section you pass. --next-version prints the next tag from the commits. towncrier does not compute that tag; it uses --version, the version key, or, for a Python package, package metadata or __version__.
How is this different from the Changesets page?
The Changesets page is for .changeset markdown files in a JavaScript monorepo, with per-package tags. This page is for towncrier news fragments, often one news file for a Python project. The github-changelog-generator page rebuilds CHANGELOG.md from the GitHub API. relnote, on all three, reads the local git log instead of those extra files or API calls.
Should I pin versions?
Yes. Pin the curl URL and the loki-inu/relnote action to the same tag (this page uses v0.3.8). The towncrier facts here are from the Towncrier 26.9.0 documentation (tutorial, command line reference, and configuration reference), not from an unreleased change. Floating latest on the relnote zipapp can change behaviour under you.