Releasing¶
Releases are published to PyPI by the release.yml workflow through PyPI trusted publishing. No
token is needed anywhere; the publisher for this repository, workflow release.yml, environment
pypi, is already registered on pypi.org.
Steps¶
- Bump
__version__insrc/harnesslab/__init__.py,versionanddate-releasedinCITATION.cff, and the BibTeXversionon the landing page (docs/index.md);tests/test_packaging.pychecks that they agree with the changelog. - Rename the
## Unreleasedheading inCHANGELOG.mdto## X.Y.Z (YYYY-MM-DD), and mirror it indocs/project/changelog.md. - Turn the docs' unreleased markers into release markers: the
> **Unreleased.** On main; ships in the next release.banners and the*(unreleased)*tags become> **New in Harness Lab X.Y.Z.**and*(X.Y.Z)*(grep -rn -i "unreleased" docs/finds them all). - If the dashboard or the CLI output changed visibly, regenerate the site images (Contributing).
- Verify:
uv sync && uv run pytest -q && uv run ruff check src tests scripts && uv run ruff format --check src tests scripts
uv run mkdocs build --strict
uv build && uv run twine check dist/*
- Commit to
main, wait for CI to pass on it, then tag and push the tag:
- Watch the workflow:
gh run list --workflow=release.yml. It runs the tests, builds the distributions, and publishes. Confirm at https://pypi.org/project/harnesslab/, then install it in a clean environment and runharnesslab run demo --variants fake-reference,fake-noop.
A version number can never be reused on PyPI; if a release fails after upload, bump again.
Documentation¶
The docs deploy to GitHub Pages from main on every push by the docs-deploy job in ci.yml, so a
release needs no separate documentation step. The site's front page (docs/index.md) is a landing page that
only MkDocs shows; GitBook opens on Start here → Overview. A GitBook space connected to the repository syncs
from the same docs/ folder.