Skip to content

ci: harden publish-pypi — build-once/publish-same-artifact + version gate + post-publish verify - #68

Merged
EdgarSocrates98 merged 1 commit into
mainfrom
ci/publish-pipeline-hardening
Oct 18, 2026
Merged

EdgarSocrates98 merged 1 commit into
mainfrom
ci/publish-pipeline-hardening

Conversation

@EdgarSocrates98

Copy link
Copy Markdown
Owner

Cycle 2.2.1 / Cycle 3+8 — PyPI release pipeline

  • build (contents:read): version gate (dispatch input ↔ pyproject, not-already-published on PyPI, changelog entry) → python -m build → twine check → wheel listing → sha256 manifest → immutable release-dist artifact
  • publish (id-token:write only here, environment: release): downloads the SAME artifact, verifies checksums, publishes via OIDC trusted publishing
  • verify (needs: publish): waits for PyPI visibility, clean-venv installs pkg==version from pypi.org/simple, smokes <cli> --version

⚠️ Operator action required before first run: PyPI trusted publisher must be updated to environment=release per project, and the GitHub release environment should get protection rules.

Split the single OIDC job into build/publish/verify with least-privilege
permissions (id-token:write scoped to publish only), a version gate
(dispatch input vs pyproject, PyPI freshness, changelog), sha256
integrity handoff via workflow artifact, environment: release, and a
post-publish install+smoke-test of the released package.
@EdgarSocrates98
EdgarSocrates98 merged commit 308c70b into main Oct 18, 2026
1 of 5 checks passed
@EdgarSocrates98
EdgarSocrates98 deleted the ci/publish-pipeline-hardening branch October 18, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant