Releases are prepared through a release PR and published by pushing a version tag. The GitHub Actions release workflow runs on tags matching v*.*.*.
The release PR should be limited to release preparation changes whenever possible: version files and changelog updates.
The release version must match in all of these places:
pyproject.tomlcli/__init__.pyvx.x.xThe release workflow validates this and fails if they differ.
Start from an updated main branch.
git checkout main
git pull origin main
git checkout -b release/x.x.x
Update version files if needed.
# pyproject.toml
version = "x.x.x"
# cli/__init__.py
__version__ = "x.x.x"
Finalize CHANGELOG.md.
Move entries from:
## [Unreleased]
to:
## [x.x.x] - YYYY-MM-DD
Then add a fresh empty section above it:
## [Unreleased]
Run release gates.
ruff check --fix .
ruff format .
python3 -m pytest
cubic review -j
Commit and push.
git add pyproject.toml cli/__init__.py CHANGELOG.md
git commit -m "release: prepare vx.x.x"
git push -u origin release/x.x.x
Open a PR into main.
PR title:
release: prepare vx.x.x
After the release PR is merged:
git checkout main
git pull origin main
git tag vx.x.x
git push origin vx.x.x
Pushing the tag triggers .github/workflows/release-create-cli-release.yaml.
The workflow will:
.whl and .tar.gz assetsFor hotfix/post releases, use the repository's existing tag format:
vx.x.x-n
The release workflow creates package-compatible asset aliases for these versions.
Verify that:
the installer can install the release
curl -fsSL https://raw.githubusercontent.com/christianlempa/boilerplates/main/scripts/install.sh |
bash -s -- --version vx.x.x