Release
How conditional-method is released.
Versioning
Versions come from git via setuptools-scm (guess-next-dev scheme), so
the version is always derived from tags:
git tag v0.2.0
git push origin v0.2.0
Release pipeline
A tag push (v*) — or a manual workflow_dispatch with a tag — triggers
.github/workflows/release.yml:
- sdist —
python -m build --sdist; the version is verified against the tag (setuptools-scm). - Wheels — cibuildwheel builds the full many-arch
cp39-abi3matrix (Linux x86_64/aarch64/i686/ppc64le/s390x/armv7l, macOS arm64/x86_64, Windows AMD64/ARM64/x86). Every wheel must carry thecp39-abi3tag. - GitHub Release — a draft release is created with the sdist + all wheels attached (SHA-256 integrity listing) and auto-generated notes.
- PyPI — all artifacts are published to
conditional-methodvia trusted publishing (OIDC, no hard-coded tokens), skipping already-uploaded files for idempotent re-runs.
Separately, every push runs CI (lint, tests on 3.9–3.14, coverage gate
90%, ASan/UBSan) and the wheels/pages workflows — catch regressions before you tag.
Trusted publishing (one-time setup)
- Register the project
conditional-methodon PyPI. - Add a publishing source: GitHub Actions, owner
OWNER, repoconditional-method, workflowrelease.yml, environmentrelease. - Done — the publish job authenticates via OIDC with no secrets.
PyPI
- Project name:
conditional-method - Import module:
conditional_method(legacy shim:cfg)
Manual release (fallback)
uv build # sdist + wheel
uv publish # requires PyPI credentials / trusted publisher