Skip to content

ci: Run the release job in the release environment - #145

Merged
akalex merged 1 commit into
masterfrom
ci/add-release-environment
Aug 7, 2026
Merged

akalex merged 1 commit into
masterfrom
ci/add-release-environment

Conversation

@akalex

@akalex akalex commented Aug 7, 2026

Copy link
Copy Markdown
Member

Problem

The PyPI trusted publisher for async-firebase is configured with Environment: release, but cd.yml declares no environment. OIDC claims must match exactly, so uv publish would be rejected on the next tagged release.

Two things were wrong, not one:

  1. cd.yml did not declare environment: release.
  2. No release environment existed on the repoGET /repos/healthjoy/async-firebase/environments returned total_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

  • Added environment: release to the release job.
  • Created the release environment 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

  • ✅ YAML parses; job resolves to environment: release with permissions: {contents: read, id-token: write}
  • release environment now exists on the repo
  • ⚠️ End-to-end OIDC publishing still only proves out on a real tagged release

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.
@akalex
akalex merged commit 8b2f076 into master Aug 7, 2026
10 checks passed
@akalex
akalex deleted the ci/add-release-environment branch August 7, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant