Release process
July 5, 2026 ยท View on GitHub
This document describes how to publish a new lessonweaver release to PyPI. The
package is published automatically by the
publish.yml workflow when a GitHub Release
is published, using PyPI Trusted Publishing (OIDC) โ no API tokens are stored.
Prerequisites
- Maintainer access to the repository and the PyPI project.
- A clean working tree on an up-to-date
main. - Dev tooling installed:
pip install -e ".[dev]".
Checklist
- Pick the version. Follow SemVer. Update
versioninpyproject.toml. - Assemble the changelog. Fold the per-PR fragments in
changelog.d/into a new dated section ofCHANGELOG.md:
Preview first withpython scripts/build_changelog.py --version X.Y.Z--dry-run. This inserts the assembled## [X.Y.Z]section under## [Unreleased]and removes the consumed fragments; review the result before committing. For the first tagged release, uncomment the comparison/release link template at the bottom of the changelog and fill it in; on later releases, update those links. - Run the full local check (the same checks CI runs):
ruff check src/ tests/ ruff format --check src/ tests/ mypy src/lessonweaver/ pytest - Build the distribution and verify it. Clean
dist/first so stale artifacts from a previous version can't be checked or uploaded:
Confirm the wheel ships the type marker:rm -rf dist/ python -m build twine check dist/*
This must printpython -c "import zipfile,glob; w=glob.glob('dist/*.whl')[0]; print('lessonweaver/py.typed' in zipfile.ZipFile(w).namelist())"True. - (Optional) Smoke-test on TestPyPI:
twine upload --repository testpypi dist/* python -m pip install --index-url https://test.pypi.org/simple/ lessonweaver lessonweaver --help - Commit and tag the version bump and changelog on
main:git commit -am "release: vX.Y.Z" git tag vX.Y.Z git push origin main --tags - Publish the GitHub Release for the
vX.Y.Ztag with the changelog notes. Publishing the release triggerspublish.yml, which builds and uploads to PyPI. - Verify the release is live:
python -m pip install lessonweaver lessonweaver --help
Notes
- The first public release also requires the PyPI project name
lessonweaverto be registered and Trusted Publishing to be configured for this repository. - Do not add runtime dependencies as part of a release. Optional integrations
belong in
[project.optional-dependencies].