feat: add GitHubProductionRelease workflow for promoting to production#367
Merged
Merged
Conversation
Add a reusable GitHubProductionRelease component that generates a manual "Production Release" workflow. It is triggered via workflow_dispatch and fast-forward merges the project's default release branch into a selected production branch, then pushes it. This keeps a production promotion a deliberate, auditable action separate from merging to the default branch. When more than one production branch is configured, the workflow exposes a `target` choice input so the operator picks which branch to promote into at dispatch time (e.g. one Amplify app tracking `production` and another `production2`). Wire it into MonorepoProject as an opt-in `productionRelease` option and expose the project's `defaultReleaseBranch` so the source branch is derived automatically.
hoegerma
approved these changes
Jun 27, 2026
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.
Summary
Adds a reusable
GitHubProductionReleasecomponent that generates a manual Production Release workflow, modelled on the hand-writtenproduction-release.ymlused in radball-digital. It is triggered viaworkflow_dispatchand:GITHUB_TOKEN)This keeps a production promotion a deliberate, auditable action separate from merging to the default branch.
Behaviour
MonorepoProjectnow exposes adefaultReleaseBranchfield so the construct picks it up.productionBranches(default['production']) lists the candidate targets. With more than one, the workflow renders atargetchoice input so the operator picks at dispatch time — e.g. one Amplify app trackingproductionand another trackingproduction2.--ff-only; the chosen target travels through aTARGET_BRANCHenv var (no shell injection from the dispatch input).Wiring
Opt-in on
MonorepoProjectviaproductionRelease: true(+ optionalproductionReleaseOptions). Existing projects are unchanged until they opt in.Tests
test/production-release.test.ts— opt-in default-off, defaultmain→production, multi-target choice input, default-release-branch-as-source, and the GitHub-required guard. Fullprojen build(jsii compile + eslint + jest) passes.