* ci: add PyPI trusted publishing, abi3 wheels, bump to 0.2.1
Adds publish-pypi.yml mirroring the npm/crates.io pattern: triggers on
Cargo.toml version change, builds wheels for 5 platforms via maturin,
publishes with OIDC trusted publishing (no tokens). workflow_dispatch
serves as a manual fallback for the first run after the PyPI project
transfer.
Enables pyo3 abi3-py38 so one wheel per platform covers CPython >=3.8
(previous manual uploads were cp312-only). Bumps version to 0.2.1 since
PyPI already has 0.2.0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(pypi): guard dispatch to main, support partial-release repair
Review feedback: trusted publishing doesn't match on branch, so
workflow_dispatch needed an explicit main-ref guard. Manual dispatch now
always rebuilds and publishes with skip-existing so a release that
failed after uploading only some wheels can be completed by re-running.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(pypi): version PyPI package from pyproject.toml, not Cargo.toml
Decouple the Python package version from the crate version, matching
how npm publishing keys off napi/package.json: bump [project] version
in pyproject.toml manually and CI publishes on merge. Reverts the
Cargo.toml bump so this PR no longer triggers a crates.io release.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: remove accidentally committed uv.lock
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(ci): tolerate missing version key in parent pyproject.toml
The first merge of this workflow has a parent commit where pyproject.toml
still used dynamic = ["version"], so the old-version read would KeyError
and the auto-publish would never fire. Treat a missing key as a change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>