You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 6f: add publish-python to release.yml (PyPI via OIDC) (#25)
Three new jobs wired into the release pipeline alongside the
existing publish-crate / publish-ffi / publish-desktop chain:
- build-python-wheels (matrix, 4 cells)
- build-python-sdist (single)
- publish-python (aggregate + upload + GitHub Release)
**Why three jobs instead of one matrix with inline upload:**
PyPI expects wheels as a single batch — if each matrix cell
published its own wheel independently, a mid-matrix failure
would leave PyPI with a partial wave of a release, which is
worse than the whole thing failing cleanly. The build/publish
split aggregates every wheel + the sdist into one `dist/`
directory, then uploads atomically via
`pypa/gh-action-pypi-publish`.
**Wheel matrix** mirrors publish-ffi + publish-desktop:
ubuntu-latest → linux x86_64 (manylinux2014)
ubuntu-24.04-arm → linux aarch64 (manylinux2014)
macos-latest → macOS aarch64 (Apple Silicon)
windows-latest → windows x86_64
abi3-py38 means one wheel per platform works on every CPython
≥ 3.8 — no per-Python-version axis. An sdist is built alongside
for platforms not covered by the wheel matrix (FreeBSD,
alpine aarch64, etc.); `pip install` falls back to a source
build via the user's local Rust toolchain.
**Authentication via PyPI trusted publishing** (OIDC). Zero
long-lived tokens. The publish-python job has `permissions:
id-token: write` and lives in the `release` GitHub environment
(required-reviewer gate inherited from publish-crate). PyPI-side
config is a one-time web-UI registration documented in
docs/release-secrets.md.
**Wiring:**
- tag-all → pushes sqlrite-py-v<V>
- finalize → needs publish-python
- umbrella release body → includes 🐍 Python link pointing
to the per-product release + PyPI page
Verified locally: `cargo check -p sqlrite-python` clean,
release.yml parses as valid YAML, pyproject.toml already has
name = "sqlrite" (available on PyPI per pypi.org API, no
rename dance like crates.io needed).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds three jobs to `release.yml` — `build-python-wheels` (matrix), `build-python-sdist` (single), `publish-python` (aggregator + PyPI upload + GitHub Release).
415
+
416
+
**Two-job shape (build then publish), not one matrix job with inline upload**, because PyPI expects wheels as a single batch — racing uploads from per-platform matrix cells would leave PyPI with a partial wave if any one cell failed. Artifacts from every matrix cell land in a single aggregated `dist/` directory, which is then atomically uploaded by `pypa/gh-action-pypi-publish`.
417
+
418
+
Wheel matrix mirrors publish-ffi + publish-desktop: Linux x86_64 (manylinux2014 via the `auto` preset), Linux aarch64 (same preset on `ubuntu-24.04-arm`), macOS aarch64, Windows x86_64. abi3-py38 means one wheel per platform works on every CPython ≥ 3.8 — no per-Python-version axis. An sdist is built alongside for platforms not covered by the wheel matrix.
419
+
420
+
Authentication via PyPI trusted publishing (OIDC) — zero long-lived tokens. `permissions: id-token: write` on the publish job plus the `release` GitHub environment (one-time trusted-publisher config on PyPI's web UI, documented in `docs/release-secrets.md`).
0 commit comments