Repository navigation
ci: read release credentials from the release environment - #40
Merged
Merged
Conversation
The release job now runs in the `release` environment when it pushes the version bump to main, so it reads the GitHub App credentials from that environment. Prereleases from other branches and tag pushes don't use the App token and run without the environment, since it is limited to main.
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
releasejob readsRELEASE_APP_CLIENT_IDandRELEASE_APP_PRIVATE_KEYto mint the GitHub App token that pushes the version bump tomain. This change runs that job in thereleaseenvironment, so the credentials come from an environment that onlymaincan use, not from repository secrets that any branch's workflow can read.The environment is set only on the stable path (a push to
main):Prereleases (
workflow_dispatchfrom another branch) and manualv*tag pushes don't generate the App token. The environment's branch policy would refuse them, so they run without the environment, as they do now.No other job or workflow reads these secrets.
Checked with
npm run typecheck,npm testandnpm run build. The YAML parses. The repo has no workflow linter.