Skip to content

ci: run the OIDC publish jobs in the release environment - #6167

Merged
max-sixty merged 1 commit into
mainfrom
prql-release-env-gate
Aug 8, 2026
Merged

ci: run the OIDC publish jobs in the release environment#6167
max-sixty merged 1 commit into
mainfrom
prql-release-env-gate

Conversation

@max-sixty

Copy link
Copy Markdown
Member

publish-python and publish-js request id-token: write without naming an environment, so nothing gates the ref their OIDC token is minted from. Both now join release, whose deployment policy admits only *.*.* tags. publish-js takes the conditional form publish-to-cargo already uses, because it also runs off-release as a --dry-run on a branch ref the policy denies.

Alongside this, the release and github-pages environments now require approval from a maintainer (@snth, @max-sixty, @aljazerzen, @eitsupi — the members of prql-team, named individually so the check can verify the bot isn't among them). "Prevent self-review" is off, so whoever cuts the release can approve it, and only one of the four needs to.

A reviewer is the only gate available here. A deployment branch policy can't do the job for either environment:

  • Every publish job keys off github.event_name == 'release', and a write-scoped account can publish a release against a tag that already exists, which takes no tag operation and lands on a ref the *.*.* policy admits.
  • github-pages deploys from the web branch, which the release pushes with a PAT, so the bot can reach that ref by design.

At release time the run now pauses at these jobs with a "Review deployments" prompt.

One thing to watch on the first release under this: PyPI and npm trusted publishing check the environment claim only when the publisher config on their side names one. Both are currently published from no environment, so the config can't be naming one — but if a publish fails to authenticate, that's the setting to check.

This clears tend's credential-environments. repo-secret-allowlist still fails on the repo-level TEND_BOT_TOKEN; that one needs every consumer moved into an environment first, which is a larger change.

This was written by Claude Code on behalf of max-sixty

publish-python and publish-js mint an OIDC token with no environment named, so nothing gates the ref the token is minted from. Both now join `release`, whose deployment policy admits only `*.*.*` tags and which now requires a maintainer approval.

publish-js takes the conditional form `publish-to-cargo` already uses, since it also runs off-release as a `--dry-run` on a branch ref the policy denies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 1071f8b into main Aug 8, 2026
81 checks passed
@max-sixty
max-sixty deleted the prql-release-env-gate branch August 8, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants