Repository navigation
ci: create release tags and branches with the release App after approval - #32212
Merged
Merged
Conversation
Only coder-release-publisher may now create tags and release branches in coder/coder (rulesets "Release tags (App only)" and "Release branch creation"), and its key is only available in environments that need a second release manager's approval. People can no longer push release tags, so: - release.yaml takes `version` and `commit` inputs and runs on release/X.Y (or main for an RC). The approved release job creates the annotated tag at `commit` with the App, after checking the version matches the branch and the commit is already on it, then builds that commit as before. Re-runs reuse a tag already at that commit. - scripts/releaser no longer creates or pushes the tag: it checks the commit is on origin/<branch> and dispatches release.yaml on the branch with version and commit. - create-release-branch.yaml (dispatched on main, approved in the release-refs environment) creates release/X.Y at a commit on main. - Homebrew and the coder/packages dispatch use the coder-publisher App (release-publish environment) instead of the cdrci token; winget still needs the machine user. The packages dispatch moves to its own job in release-publish, where that key lives. - Every App token is scoped to the repository and permissions it needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sreya
previously approved these changes
Nov 16, 2026
After dispatching release.yaml, look up the run (gh run list, polling briefly since a dispatch doesn't return it) and print its URL with what happens next: another release manager approves the release environment, then the run creates the tag and publishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sreya
approved these changes
Nov 16, 2026
kylecarbs
had a problem deploying
to
docs-preview
November 16, 2026 00:54 — with
GitHub Actions
Failure
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Unblocks releases after the
coder/coderlockdown. Only thecoder-release-publisherApp can now create tags and release branches (rulesets "Release tags (App only)" and "Release branch creation", managed incoder/github-org-terraform). Its key is only available in environments that need a second release manager's approval (release-managers, no self-review, no admin bypass). People can't push release tags anymore, so the tag is now created inside the approved release run.Releasing (
./scripts/release.shworks as before, minus one step)./scripts/release.shonrelease/X.Y(ormainfor an RC), as today. It still picks the version, checks open PRs and breaking changes, and writes the release notes.origin/<branch>and dispatchesrelease.yamlon the branch withversion,commit,release_channelandrelease_notes.release-managersreviewers. Another release manager approves the run'sreleaseenvironment (Review deployments).versionatcommitwith the App, then builds, signs and publishes that commit as before.release.yamlcan also be run by hand from the Actions UI with the same inputs.release.yamlNew
versionandcommitinputs (required unlessdry_run).The
releasejob checks outcommit. Before anything else, it:release/X.Y, ormain/release/X.Yfor-rc.N);version.shand the rest of the job are unchanged.Homebrew and the
coder/packagesdispatch use the newcoder-package-publisherApp (release-publishenvironment) instead ofCDRCI_GITHUB_TOKEN. The dispatch moves to its ownpublish-packagesjob inrelease-publish, where that key lives; it's approved together with Homebrew and winget. Winget still uses thecdrcimachine user, since an App can't open PRs onmicrosoft/winget-pkgs.Every App token is scoped to one repository and the permissions it needs (
zizmor'sgithub-appaudit: 5 high findings to 0, one of which predates this PR).create-release-branch.yaml(new)Dispatched on
mainwithversion(e.g.2.40) andcommit. After approval in therelease-refsenvironment, it createsrelease/X.Yat that commit, refusing one that isn't onmainor a branch that already exists.scripts/releaserReleaseExecutordropsCreateTag/PushTag.TriggerWorkflowdispatches on the branch withversionandcommit.gh run list, polling briefly) and prints its URL and the approval steps.Before merging
RELEASE_APP_IDandRELEASE_APP_PRIVATE_KEYset in therelease-refsenvironment (currently empty), and the rotated release App key inrelease.CODER_PACKAGE_PUBLISHER_APP_ID/CODER_PACKAGE_PUBLISHER_APP_PRIVATE_KEYinrelease-publish; App installed onhomebrew-coderandpackages.After merging: backport to every branch you release from
release.yamlruns from the dispatched branch's own copy, and./scripts/release.shruns the branch's releaser. So eachrelease/X.Yneeds this change before it can release. Active lines by recent tags:release/2.39,2.38,2.37,2.36,2.35,2.34,2.29.Relation to #31321
#31321 (
Tag release) runs the releaser non-interactively in CI. This PR is the smaller change that unblocks releases now. #31321 can build on it: its tagging job would needenvironment: release-refs(where the App key lives) plus the extra App permissions it asks for, which are a manifest change incoder/github-org-terraformapps/.Testing
go build,go vet,go test ./scripts/releaserpass.actionlintandzizmorare clean on both workflows.v2.40.0-rc.Nfrommain), watching the tag step.🤖 Generated with Claude Code