Skip to content

ci: publish to PyPI with trusted publishing (CB-0) - #229

Draft
spicysouvlaki wants to merge 1 commit into
mainfrom
william/cb-0-pypi-trusted-publishing
Draft

spicysouvlaki wants to merge 1 commit into
mainfrom
william/cb-0-pypi-trusted-publishing

Conversation

@spicysouvlaki

Copy link
Copy Markdown
Collaborator

Publish via PyPI trusted publishing (OIDC) with attestations; drops the long-lived PYPI_TOKEN path. Before merge: a PyPI owner adds the trusted publisher (browserbase/sdk-python, publish-pypi.yml, env release). After the first good release: delete PYPI_TOKEN and revoke it on PyPI.

🤖 Generated with Claude Code

PYPI_TOKEN was a long-lived repo secret (2025-09-05) readable by any
workflow on any branch, so any of the repo's writers could publish to PyPI
without the `release` environment approval. PyPI releases also carried no
provenance (integrity API: "No provenance available" for 1.26.0).

Publish now builds with uv and uploads through
pypa/gh-action-pypi-publish, which uses the job's OIDC token and uploads
PEP 740 attestations. The trusted publisher on PyPI must be pinned to
workflow publish-pypi.yml and environment `release`, so only an approved
run from main or a v* tag can publish.

Drops bin/publish-pypi and the PYPI_TOKEN release-doctor check. Delete the
PYPI_TOKEN secret and revoke the token on PyPI once a release succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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