Force dry-run for staging branches (never release from *-staging)#2100
Closed
cipolleschi wants to merge 3 commits into
Closed
Force dry-run for staging branches (never release from *-staging)#2100cipolleschi wants to merge 3 commits into
cipolleschi wants to merge 3 commits into
Conversation
We must never release from the staging branch. Mirror the static_h setup: - Add the staging branch to the force-dry-run guard in set_release_type so RELEASE_TYPE is always dry-run, even for a manual workflow_dispatch that requests 'release'. Previously only static_h was guarded, so a dispatch on staging could have produced a real release. - Add the staging branch to the push and pull_request triggers so the RN build actually runs (and is verified) on the branch and its PRs.
Generalize the release guard so any *-staging branch (not just 260318099.0.0-staging) is always built in dry-run mode, including via workflow_dispatch. Release branches (*-stable) are unaffected.
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jul 7, 2026
…o 260318099.0.0 (#2101) Summary: Makes `static_h` the source of truth for the RN build's branch handling, so branches cut for **future release trains** (e.g. `26xxxx.*`, `27xxxx.*`) inherit the correct behavior automatically — no per-branch edits to `rn-build-hermes.yml`. Also advances the package version to the next train. This is the generic form of what #2100 did for `260318099.0.0-staging`. ### 1. Triggers → globs `push` and `pull_request` now match `static_h`, `'*-stable'`, and `'*-staging'` instead of listing individual branches. Any future stable/staging branch runs the RN build (and is verified on its PRs) out of the box. `250829098.0.0-stable` is now covered by `'*-stable'`. ### 2. Dry-run guard → generalized `set_release_type` forces `RELEASE_TYPE=dry-run` for `static_h` **and any branch whose name ends in `-staging`**, regardless of event — including `workflow_dispatch`, which has no branch filter and could otherwise be used to cut a real release from a staging branch. ```bash if [[ $REF == "refs/heads/static_h" || $REF == refs/heads/*-staging ]]; then # forced dry-run ``` ### 3. Bump version `npm/hermes-compiler/package.json` bumped from `250829098.0.0` to `260318099.0.0` (the next release train's version). ## Behavior | Ref | Runs RN build | Release allowed? | |---|---|---| | `static_h` | yes | no (forced dry-run) | | `*-staging` (any) | yes | no (forced dry-run, even via dispatch) | | `*-stable` (any) | yes | yes, via `workflow_dispatch` with `release` | | PRs targeting the above | yes | dry-run | Note: pushing to a `*-stable` branch is dry-run (falls through to the `else`); an actual release still only happens via a manual `workflow_dispatch` selecting `release` on a stable branch — unchanged from today. Pull Request resolved: #2101 Test Plan: - Verified the guard forces dry-run for `static_h` + `*-staging` and leaves `*-stable` releasable. - Verified the trigger globs parse to `[static_h, *-stable, *-staging]` for both `push` and `pull_request`. - Verified `package.json` is valid and version is `260318099.0.0`. - CI on this PR should trigger "RN Build Static Hermes" in dry-run. Reviewed By: cortinico, praneethy9 Differential Revision: D110871622 Pulled By: cipolleschi fbshipit-source-id: 5cbe89164b9f4e17e36d2bfef542ad084a52e275
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
We must never release Hermes from a staging branch. This mirrors the
static_hnon-releasing setup inrn-build-hermes.yml, and generalizes it to all staging branches.Force dry-run guard (generalized).
set_release_typenow forcesRELEASE_TYPE=dry-runforstatic_hand any branch whose name ends in-staging, regardless of event type. Previously onlystatic_hwas guarded, so a manualworkflow_dispatchwithrelease-type: releaseon a staging branch would have produced a real release. The glob (refs/heads/*-staging) means future staging branches are covered automatically — important becauseworkflow_dispatchhas no branch filter and can be run on any branch.Run CI on the branch. Added
260318099.0.0-stagingto thepushandpull_requestallowlists so the RN build runs on the branch and its PRs (matching howstatic_hruns on itself).Behavior after this change
refs/heads/static_hrefs/heads/260318099.0.0-stagingrefs/heads/<anything>-stagingrefs/heads/260318099.0.0-stablerefs/pull/*/merge(PRs)elsebranchTest Plan
static_h+*-stagingand does not match*-stable.set_release_typereporting dry-run.Note
The
push/pull_requestbranch allowlists still list the staging branch explicitly. Converting those to globs ('*-staging') is a possible follow-up; left out here to keep the diff focused on the release-safety guard.