(DRAFT) Create prepare-release script and bot pipeline#15689
Draft
vmoroz wants to merge 1 commit intomicrosoft:mainfrom
Draft
(DRAFT) Create prepare-release script and bot pipeline#15689vmoroz wants to merge 1 commit intomicrosoft:mainfrom
vmoroz wants to merge 1 commit intomicrosoft:mainfrom
Conversation
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.
Description
Type of Change
Why
Today,
publish.ymlpushes version bumps directly to protected branches using a PAT (beachball publish), and also publishes npm packages via ESRP — mixing build and release concerns. The***NO_CI***commit message hack prevents infinite build loops, and manual recovery from failures is difficult.This PR replaces that with a bot-driven PR-based version bump flow, inspired by the changesets/action pattern used in microsoft/rnx-kit.
Core idea: version bumps are just code changes, and code changes go through PRs.
A scheduled bot detects pending change files, runs
beachball bump, and creates/updates a "Version Packages" PR. A maintainer reviews and merges it. The publish pipeline then just packs artifacts (no git push, no npm publish). The release pipeline handles all registry publishing.How recursion is avoided: The bot pushes to branches prefixed with
prepare-release/(e.g.,prepare-release/main). The PR pipeline detects this prefix and skipsbeachball check(change files are already consumed). No***NO_CI***hack needed — the version bump merge is a normal commit that triggers a normal build.What
New:
@rnw-scripts/prepare-releasepackage (packages/@rnw-scripts/prepare-release/)beachball bump, creates/updates a GitHub PR viaghCLInpx prepare-release --branch main)New:
prepare-release-bot.ymlpipelinemainand*-stablebranchesnpx prepare-release --branch $(Build.SourceBranchName)Modified:
publish.yml— now a pure build-and-pack pipelinebeachball publish,configure-git.yml,git pull, ESRP npm release, GitHub Releases,***NO_CI***cancellation,skipGitPush/skipNpmPublish/stopOnNoCIparametersnpmPack.js --clean --no-colorto pack npm tarballs (replacesbeachball publish --pack-to-path)release.ymlcontinues to work as-isModified:
jobs/setup.yml— skipbeachball checkfor bot PRsnot(startsWith(variables['System.PullRequest.SourceBranch'], 'refs/heads/prepare-release/'))beachball bumpstill runs (needed for correct versions in test builds)Screenshots
N/A — pipeline changes only.
Testing
@rnw-scripts/prepare-releasebuilds successfully (npx lage build --scope @rnw-scripts/prepare-release)npx prepare-release --branch main --dry-rundetects change files, runs beachball bump, generates PR bodyprepare-release-bot.ymlin ADO, run manually againstmain— verify PR creationpublish.yml— verify npmPack.js produces tarballs, artifacts publish correctlyrelease.ymldownstream — verify it picks up artifacts and publishes as beforeprepare-release/main— verifybeachball checkis skipped, CI passesChangelog
Should this change be included in the release notes: no
Internal pipeline automation change. No user-facing behavior change.
Microsoft Reviewers: Open in CodeFlow