Create the official Rspack release pull request for a stable or pre-release version bump. Use when the task is to prepare a formal release branch from a clean checkout, sync to the latest origin/main, run `./x version` with an optional `--pre alpha|beta|rc`, confirm the resulting JavaScript and Rust versions with the user, open the release PR, trigger Ecosystem CI, and report the PR plus workflow URLs.
Create the official Rspack release pull request for a stable or pre-release version bump. Use when the task is to prepare a formal release branch from a clean checkout, sync to the latest origin/main, run `./x version` with an optional `--pre alpha|beta|rc`, confirm the resulting JavaScript and Rust versions with the user, open the release PR, trigger Ecosystem CI, and report the PR plus workflow URLs.
Rspack Release PR
Overview
Create the formal release pull request from a clean checkout, stop for explicit version confirmation, then publish the branch and trigger the follow-up workflow.
Prefer this workflow for official major, minor, or patch releases, including alpha, beta, and rc pre-releases. Do not use it for snapshot, debug, or canary flows.
Treat this workflow as destructive to unstaged local changes.
If git status --short is not clean and the user did not explicitly ask to discard local unstaged changes in this turn, stop and confirm before cleaning.
If staged changes already exist, stop and ask how to handle them. A release PR should start from a fully clean tree.
After , stop and show both versions. Do not commit, push, open the PR, or trigger workflows until the user confirms the versions.
./x version ...
Workflow
1) Clean the worktree
Inspect the tree first:
git status --short
git diff --cached --quiet
If there are staged changes, stop.
If there are only unstaged tracked or untracked changes and the user explicitly authorized discarding them, clean them non-interactively:
Default to patch when the user does not specify one
If the user explicitly asks for alpha, beta, or rc, add --pre <tag>
Examples:
./x version patch
./x version minor
./x version patch --pre rc
./x version minor --pre beta
./x version ... already updates the published JavaScript package versions, updates the Rust workspace version through the release tooling, runs cargo codegen, and runs pnpm run format:js.
After the command finishes, read the authoritative versions from:
JavaScript packages: packages/rspack/package.json
Rust crates: [workspace.package].version in the root Cargo.toml
Do not report the previous latest run. Only report the first new workflow_dispatch run from DISPATCH_USER that appears after your dispatch for PR_NUMBER.
8) Report the result
End by telling the user:
PR URL: <pr_url>
Ecosystem CI URL: <ecosystem_ci_url>
Include the confirmed JavaScript and Rust version numbers again if that helps the handoff.
Common traps
Do not keep local staged work mixed into the release PR.
Do not skip the user confirmation step after ./x version ....
Do not derive the PR title from template packages under packages/create-rspack/template-*; use the published version in packages/rspack/package.json.
Do not forget that the Rust version is authoritative in the root Cargo.toml, even though ./x version updates many files.
Do not stop at the workflow dispatch command. Always retrieve the PR URL and the workflow run URL before reporting completion.