Repository navigation
Publish to PyPI via Trusted Publishing instead of username/password - #104
Merged
Merged
Conversation
Co-authored-by: phobson <1163939+phobson@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job deploy
Publish to PyPI via Trusted Publishing instead of username/password
Oct 22, 2026
phobson
approved these changes
Oct 22, 2026
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.
The
deployjob built the package but failed atuv publish. PyPI returned 403 because username/password authentication is no longer supported.This moves
python-publish.ymlto PyPI Trusted Publishing, which authenticates with GitHub OIDC and needs no stored credentials.UV_PUBLISH_USERNAMEandUV_PUBLISH_PASSWORD(thePMH_PYPI_USERandPMH_PYPI_PASSsecrets).uv publish --trusted-publishing always.alwaysmakes the job fail if OIDC isn't available, rather than falling back to credentials.id-token: write(needed to mint the OIDC token) alongsidecontents: read.environment: pypito the job.Needs doing before the next release:
probscaleon pypi.org with these values:matplotlib/mpl-probscalepython-publish.ymlpypipypienvironment name is my choice. Either use it on PyPI and create the environment in the repo settings, or remove theenvironment:line and leave that field blank on PyPI. If the two don't match, the publish will fail.