This document describes how to cut a release of chimera-run to PyPI.
Releases are automated via .github/workflows/publish.yml, which runs on any tag matching v* and publishes using PyPI Trusted Publishing (OIDC, no API tokens required).
Before the first automated release works, a PyPI maintainer must register this GitHub repository as a Trusted Publisher.
- Go to https://pypi.org/manage/account/publishing/ (or to the project page once the package exists: https://pypi.org/manage/project/chimera-run/settings/publishing/).
- Click Add a new pending publisher (first release) or Add a new publisher.
- Fill in:
- PyPI project name:
chimera-run - Owner:
0bserver07 - Repository name:
chimera - Workflow name:
publish.yml - Environment name:
release
- PyPI project name:
- Save.
On the GitHub side, create an Environment named release:
- Repo → Settings → Environments → New environment →
release. - Optional but recommended: add required reviewers so a human approves the publish step.
- No secrets need to be configured — Trusted Publishing is token-less.
- Make sure
masteris green. CI passes, tests green, docs build. - Bump the version in the two places it lives:
pyproject.toml→project.versionchimera/__init__.py→__version__(The workflow fails fast if the git tag does not matchpyproject.toml.)
- Update
CHANGELOG.mdwith the new version and a summary of changes. - Commit the bump:
git add pyproject.toml chimera/__init__.py CHANGELOG.md git commit -m "release: v0.3.1" git push origin master - Tag and push:
git tag v0.3.1 git push --tags
- Watch the workflow at https://github.com/0bserver07/chimera/actions/workflows/publish.yml.
buildjob:uv buildproduces sdist + wheel, verifies tag matches version.publish-pypijob: uploads to PyPI via OIDC.github-releasejob: creates/updates a GitHub Release with artifacts attached.
- Verify the package is live on PyPI:
pip index versions chimera-run pip install chimera-run==0.3.1 python -c "import chimera; print(chimera.__version__)" - Update
README.mdinstall block. Remove anypip install git+https://github.com/...fallback lines and restore the standard:pip install chimera-run pip install "chimera-run[anthropic]" - Announce (if relevant): release notes on the GitHub Release page, docs site banner, any external channels.
- Bump to the next dev version on
master(optional, if usingX.Y.Z.dev0conventions).
Before pushing a tag, confirm:
-
uv run pytestpasses locally (and CI is green onmaster). -
uv run ruff check chimera/is clean. -
uv run mypy chimera/is clean (or known failures are documented). -
CHANGELOG.mdhas an entry for the new version. -
pyproject.tomlversion andchimera/__init__.py__version__match the intended tag. - Docs build (
cd site && pnpm install && pnpm build) succeeds. -
uv buildlocally produces valid sdist + wheel indist/. -
uv run python -m twine check dist/*(or equivalent) reports no issues, if run. - No uncommitted changes in the working tree.
- The previous release is tagged and published (no skipped versions).
- PyPI Trusted Publisher is registered for this repo/workflow/environment (one-time, see above).
- GitHub Environment
releaseexists (one-time).
PyPI does not allow deleting a released version, but you can yank a bad release:
- Go to https://pypi.org/manage/project/chimera-run/releases/.
- Click the bad version → Options → Yank.
Yanked versions stay installable by pinned requirements but are excluded from fresh installs. Then cut a new patch release (v0.3.2) with the fix.
- Do not commit API tokens or add PyPI secrets to the repo. Trusted Publishing is token-less by design.
- Tag pattern
v*is used bypublish.ymlonly. The existingci.ymltriggers onpushtomasterandpull_request, so there is no overlap. uv buildis used intentionally (the project builds with hatchling via uv). Do not switch topython -m buildwithout updating this doc.