Skip to content

ci: read release credentials from the release environment - #40

Merged
gp42-ops merged 1 commit into
mainfrom
ci/release-environment
Nov 14, 2026
Merged

gp42-ops merged 1 commit into
mainfrom
ci/release-environment

Conversation

@gp42-ops

Copy link
Copy Markdown
Member

The release job reads RELEASE_APP_CLIENT_ID and RELEASE_APP_PRIVATE_KEY to mint the GitHub App token that pushes the version bump to main. This change runs that job in the release environment, so the credentials come from an environment that only main can 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):

environment: ${{ (github.event_name == 'push' && github.ref_type != 'tag') && 'release' || '' }}

Prereleases (workflow_dispatch from another branch) and manual v* 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 test and npm run build. The YAML parses. The repo has no workflow linter.

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.
@gp42-ops
gp42-ops marked this pull request as ready for review November 14, 2026 11:53
@gp42-ops
gp42-ops merged commit 95aefa2 into main Nov 14, 2026
1 check passed
@gp42-ops
gp42-ops deleted the ci/release-environment branch November 14, 2026 12:02
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.

1 participant