Skip to content

ci: run the release draft in a release environment - #470

Merged
thomson-t merged 3 commits into
mainfrom
ci/run-the-release-draft-in-a-release-environment
Nov 17, 2026
Merged

thomson-t merged 3 commits into
mainfrom
ci/run-the-release-draft-in-a-release-environment

Conversation

@nickolas-dimitrakas

Copy link
Copy Markdown
Contributor

Why

Release automation should hold release credentials only where releases run. Release Draft read the release GitHub App's credentials from repository-level secrets, which every workflow on every branch can read, and Trunk Upgrade's App token was already being discarded.

Programme

Standalone change, no programme.

What changes

  • Release Draft runs in the release environment, which allows main and maintenance/3.x by exact name, and reads the release GitHub App's credentials from it.
  • Trunk Upgrade no longer creates a GitHub App token. Actions skips a job output that holds a secret, so the shared workflow was already running on github.token.

No changelog entry, because nothing in the published package changes.

Linked work

Related: the same change in ROKT/rokt-sdk-react-native#336.

Rollout

Path: CI only; nothing is published.

  1. Before merging: the release environment allows main and maintenance/3.x and holds the credentials.
  2. Merge; the next draft release confirms it.
  3. Once maintenance/3.x gets the same change, remove the repository-level copies.

Feature flags: none.
Turning it off: revert this pull request.
What we watch: the next draft release succeeds.

Risks

  • Merged before the environment holds the credentials; the draft fails at its token step and nothing is published; Rollout step 1 comes first.

Risk class: low.

Who

Written by: an automated coding agent (Claude Code), at an engineer's request.
Code reviewed before opening: an independent review agent; no person yet.
Checked: the changed workflows pass actionlint, and the environment's branch policy was read back through the GitHub API.
Not checked: a run on a real runner, which the next run after merging covers.

Size

Hand-written: 2 files, 1 line added and 25 removed.
Generated: none.

@nickolas-dimitrakas nickolas-dimitrakas self-assigned this Nov 17, 2026
@nickolas-dimitrakas
nickolas-dimitrakas marked this pull request as ready for review November 17, 2026 04:52
@nickolas-dimitrakas
nickolas-dimitrakas requested a review from a team as a code owner November 17, 2026 04:52
Copilot AI balanced review requested due to automatic review settings November 17, 2026 04:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Access restrictions prevented verification that the pinned reusable workflow defaults to github.token when the token input is omitted, and release-environment credentials and branch restrictions still require human confirmation.

No open issues 🎉

What changed in this PR

This CI-only change scopes release credentials to the release environment and removes unused token generation from Trunk Upgrade. Published package behavior is unchanged.

Changes:

  • Run Release Draft in the release environment to use environment-scoped credentials.
  • Remove Trunk Upgrade’s GitHub App token job and secret requirements, retaining its existing github.token fallback.
File Description
.github/​workflows/​trunk-upgrade.yml Removes App token generation, required secrets, and token forwarding.
.github/​workflows/​release-draft.yml Assigns the release PR creation job to the release environment.

Review effort: Balanced

thomson-t
thomson-t previously approved these changes Nov 17, 2026
Merging main brought back Trunk Upgrade's `with: token:`, which reads an
output of the token job this pull request removes. actionlint rejects
the reference, and the shared workflow already falls back to
`github.token`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thomson-t
thomson-t merged commit 226f55e into main Nov 17, 2026
11 checks passed
@thomson-t
thomson-t deleted the ci/run-the-release-draft-in-a-release-environment branch November 17, 2026 18:38
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.

3 participants