ci: Run the release job in the release environment - #145
Merged
Merged
Conversation
The PyPI trusted publisher for this project is configured with environment "release". OIDC claims must match exactly, so the release job has to declare it or uv publish is rejected.
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
The PyPI trusted publisher for
async-firebaseis configured with Environment:release, butcd.ymldeclares no environment. OIDC claims must match exactly, souv publishwould be rejected on the next tagged release.Two things were wrong, not one:
cd.ymldid not declareenvironment: release.releaseenvironment existed on the repo —GET /repos/healthjoy/async-firebase/environmentsreturnedtotal_count: 0.Note this predates the Poetry→uv migration. The environment mismatch would have broken a tagged release under the old token-based flow too; it just went unnoticed because no release has been cut since the publisher was configured.
Fix
environment: releaseto thereleasejob.releaseenvironment on the repo (previously missing).Effect
Aligns the workflow with the existing PyPI publisher, so no PyPI-side change is needed. The environment is also now available to carry protection rules (required reviewers, tag restrictions) if you want to gate publishes later.
Verification
environment: releasewithpermissions: {contents: read, id-token: write}releaseenvironment now exists on the repo