Releasing
Releases are made by semantic-release when develop is
merged into main. Nothing is published by hand.
What decides the version
Section titled “What decides the version”The commits since the last release:
| Commits | Version |
|---|---|
a fix: or perf: |
patch: 0.1.0 → 0.1.1 |
a feat: |
minor: 0.1.0 → 0.2.0 |
a BREAKING CHANGE: footer |
major, or minor while the version is 0.x |
A breaking change needs the BREAKING CHANGE: footer: the commit analyzer reads it, not the !
after the type. Write both, as commitlint expects the ! too.
The 0.x versions
Section titled “The 0.x versions”trueflac starts at 0.1.0: the API may still change before 1.0. Two settings make it so:
- the tag
v0.0.0on the first commit, so that the first release counts from zero (semantic-release starts at 1.0.0 otherwise); - a release rule in
.releaserc.jsonthat makes a breaking change a minor release.
Going to 1.0 is a decision: remove that rule, and the next breaking change, or a commit with a
BREAKING CHANGE: footer saying so, releases 1.0.0.
docs:, test:, ci:, build:, chore: and refactor: commits make no release on their own.
What the release workflow does
Section titled “What the release workflow does”.github/workflows/release.yml runs on each push to main:
- Wait for CI: the release waits until the checks of the commit have passed.
- Create Release: semantic-release computes the version, writes it into
pyproject.tomlanduv.lock(scripts/bump_version.py), adds the notes toCHANGELOG.md, commits them aschore(release): X.Y.Z, tagsvX.Y.Zand publishes the GitHub release. - Publish to PyPI: from the tag,
uv buildmakes the wheel and the source archive, published by trusted publishing: PyPI trusts this workflow in thepypienvironment, and no token is stored. - Sync develop:
mainis merged back intodevelop.
The documentation workflow then publishes this site from main, so the docs always match the
released version.
After a release
Section titled “After a release”Edit the GitHub release: a short summary on top, in plain words, then the generated notes.