ci: use OIDC trusted publishing for PyPI releases#54
Merged
brendanjryan merged 1 commit intomainfrom May 2, 2026
Merged
Conversation
Releases since v0.5.0 have failed with 403 Forbidden because wevm/changelogs ran twine upload with no token (no pypi-token input was provided), and the separate publish job using pypa/gh-action-pypi-publish never ran since the release job errored first. wevm/changelogs now natively supports PyPI Trusted Publishing (OIDC) as of tempoxyz/changelogs#116. When pypi-token is empty and the workflow has id-token: write, it mints a short-lived PyPI API token by exchanging the GitHub OIDC ID token at PyPI's _/oidc/mint-token endpoint. Collapse the two-job workflow into a single release job that: - pins to the changelogs commit with OIDC support (de02501) - grants id-token: write + environment: pypi so the OIDC mint flow matches the registered Trusted Publisher entry on PyPI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Release commits since
v0.5.0have failed with403 Forbiddenfrom PyPI:The
releasejob ranwevm/changelogs, which did its owntwine uploadwith nopypi-tokeninput, so twine had no auth and PyPI rejected it. The separatepublishjob usingpypa/gh-action-pypi-publishnever ran becausereleaseerrored first.Fix
wevm/changelogsnow natively supports PyPI Trusted Publishing (OIDC) as of tempoxyz/changelogs#116. Whenpypi-tokenis empty and the workflow hasid-token: write, it mints a short-lived PyPI API token at PyPI's_/oidc/mint-tokenendpoint and uses it for the upload.Collapse the two-job workflow into a single
releasejob that:wevm/changelogsto the merge commit with OIDC support (de02501).id-token: writeandenvironment: pypiso the OIDC mint flow matches the registered Trusted Publisher entry on PyPI.Setup
The PyPI Trusted Publisher entry on
pytemposhould match:tempoxyzpytempopublish.ymlpypiNo new secrets are needed — the
PYPI_TOKENsecret can be removed after this lands.