Repository navigation
Align PyPI publish workflow OIDC claims with trusted publisher configuration - #81
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job build-and-publish
Align PyPI publish workflow OIDC claims with trusted publisher configuration
Jul 2, 2026
pedrohcgs
marked this pull request as ready for review
July 2, 2026 19:01
There was a problem hiding this comment.
Pull request overview
This PR fixes PyPI Trusted Publishing failures for the csdid package by ensuring the GitHub Actions OIDC token includes the expected environment claim. It does so by running the publish job under the pypi GitHub environment, aligning workflow token claims with the configured PyPI trusted publisher.
Changes:
- Add
environment: pypito thebuild-and-publishjob in the PyPI publish workflow to ensure correct OIDC claim matching.
pedrohcgs
approved these changes
Jul 2, 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
build-and-publishGitHub Actions job was failing during PyPI trusted publishing withinvalid-publisher. The job token claims showedenvironment: MISSING, which prevented claim matching on the PyPI publisher side.Root cause
build-and-publishin.github/workflows/pypi.ymldid not run under the expected GitHub environment, so OIDC claims did not include the environment required by trusted publishing.Change
environment: pypiWorkflow impact
skip-existing: true, same build/check/publish steps).