Repository navigation
Publish to PyPI on v* tag push, not manual dispatch - #6
Conversation
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
The change reworks
Reviewed commit: 21ddaff |
There was a problem hiding this comment.
Expand to see previous review
This PR refactors the PyPI publish workflow to gate publishing on tag pushes only, with a rebuilt artifact in a separate publish job.
Key findings
- 🟡 Publish job rebuilds instead of reusing tested artifacts — pypi-publish.yml:82
|
@tenki-reviewer please re-review. Since the last review:
|
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
The change introduces an OIDC-based PyPI publish pipeline and documents the release flow. The build job builds and validates distributions with
Reviewed commit: e055d21 |
Move releases to the jardinero model: pushing a v* tag is the only path that publishes, and workflow_dispatch becomes a dry run that builds, tests, and twine-checks without publishing. Who can release is then exactly who can push a v* tag, which a tag ruleset gates for more than the six approvers an environment's required-reviewer rule allows. A tag push must also match the pyproject version before it publishes. The workflow is two jobs. build tests, builds, and twine-checks the package and uploads dist/ as an artifact; publish runs only on a tag push and is the one job bound to the pypi-publish environment / OIDC trusted publisher. It downloads that exact artifact and publishes it, running no checkout, pip install, or build, so no freshly resolved code executes in the job holding id-token: write and the published bytes are the bytes that were tested. Also document the flow in docs/release-process.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e055d21 to
315456b
Compare
|
@tenki-reviewer please re-review — squashed to a single commit, which dismissed the prior approval. Changes since approval: squashed the three commits into one (no content change from the approved diff) and fixed the nit — |
|
Review complete. No issues found — approved ✅. This PR introduces a GitHub Actions workflow that separates building wheels/sdist from publishing them via PyPI trusted publishing, and documents the release process to match.
The workflow's provenance, permission scoping, and tag-gating are all sound; no issues met the reporting threshold. Reviewed commit: 315456b |
Moves PyPI releases to the tag-triggered model used by
LuxorLabs/jardinero, so publishing is gated by who can push av*tag rather than by an environment's required reviewers (which cap at 6).Behavior
v*tag push → publishes. The only path that reaches PyPI.workflow_dispatch→ dry run. Builds, runspytest, andtwine checks the package, but never publishes. Runs on any branch.pyproject.tomlversion (v1.4.2⇒1.4.2) or it fails before publishing. The existing "already on PyPI" idempotency check is kept.Why the job split
The job is split into
build(no environment, runs on every trigger) andpublish(if: push, bound to thepypi-publishenvironment / OIDC trusted publisher). An environment applies to a whole job, so a single-job version couldn't both restrict the environment tov*tags and let dry runs dispatch on a branch. Split, the dry run is environment-free and the publish is the only environment-bound job. No new actions or SHAs.Settings to change after merge
pypi-publishenvironment — remove required reviewers; set Deployment branches and tags to Selected →v*.v*, rule Restrict creations, with the release managers (or a team) on the bypass list. That bypass list is who can publish, and it isn't limited to 6.OIDC trusted publisher needs no change — it keys on the workflow filename + environment, both unchanged.
🤖 Generated with Claude Code