Create Release
Cut a Backend.AI WebUI release, create its GitHub release, and move main to the
next version.
Release model
| Release | Cut from | Release commit | main afterwards |
| ------------------------------------------------------------------------------- | -------------------------------- | ------------------------------ | ------------------------------------ |
| X.Y.0-alpha.N | origin/main HEAD, tagged as is | none | bump PR to X.Y.0-alpha.N+1 |
| first freeze of X.Y — its first beta, rc or stable (usually X.Y.0-rc.0) | origin/main → branch X.Y | release: v{VERSION} on X.Y | bump PR to the next line's alpha.0 |
| later beta / rc / stable / patch | origin/X.Y | release: v{VERSION} on X.Y | unchanged |
- Alphas are snapshots of
main.mainalready holds the next alpha
version in every file make versiontag writes (the previous run's bump PR put
it there), so the alpha tag goes on origin/main HEAD with no commit, no
checkout and no release branch.
- The release branch starts at the first freeze. The team usually goes
alpha → rc.0 without a beta, so "first freeze" means the first non-alpha
release of X.Y, whatever its suffix. From then on fixes reach X.Y through
cherry-pick-to-release, not by merging main.
- Build stamps are regenerated by the release build.
package.yml's
build_web runs make versiontag, so buildNumber / buildDate /
revision in version.json and index.html may be stale on the tagged
commit. The version fields may not: build_mac packages the committed
electron-app/package.json without re-stamping it, so every file
make versiontag writes must already read {VERSION}.
Version files: root package.json (the source, set by hand) and what
make versiontag writes from it — version.json, index.html,
manifest.json, react/package.json, packages/backend.ai-ui/package.json,
packages/backend.ai-docs-toolkit/package.json, electron-app/package.json.
Shell state does not survive between Bash tool calls. The $WT, $BWT,
$BASE_TAG below are placeholders: substitute the literal value in every
command, or set and use a variable within one call.
Arguments
$ARGUMENTS specifies the version to release (e.g., 26.4.0-alpha.1,
26.4.0-rc.0, 26.4.0). "다음 알파" / "next alpha" means the version
origin/main already reads.
If Arguments Not Provided
git fetch origin main --tags, then read the version from
git show origin/main:package.json.
- Look up what exists for main's line (
git tag -l 'vX.Y.*') and for
every frozen line still in progress — a line with a beta/rc tag and no
stable vX.Y.0 yet (usually the previous line after its rc.0).
- Offer options via
AskUserQuestion, labels filled with computed versions:
mainreadsX.Y.0-alpha.N, its tag does not exist, and the line is not
frozen (step 1) → X.Y.0-alpha.N (recommended), X.Y.0-rc.0, custom.
- The tag already exists → say the bump PR has not merged yet and offer
only the freeze / custom options; another alpha would repeat a version.
- Each frozen line in progress → its next
rc.N(orbeta.N) and stable
X.Y.0. A released line takes a patch X.Y.Z+1 only when asked.
Process
1. Validate Prerequisites
- Validate the format:
X.Y.ZorX.Y.Z-{alpha|beta|rc}.N. - Fetch everything the run reads, so no decision rests on a stale ref:
```bash
git fetch origin main --tags
git fetch origin X.Y 2>/dev/null || true # absent before the first freeze
```
v{VERSION}must not exist (git rev-parse -q --verify refs/tags/v{VERSION}).- Classify the release:
- frozen = any tag
vX.Y.0-beta.*,vX.Y.0-rc.*orvX.Y.0exists. - alpha on a frozen line → stop:
mainalready carries the next line's
work, so an X.Y alpha would publish it under the wrong line.
- non-alpha on a line that is not frozen → first freeze (2b).
origin/main
must still be on line X.Y (its package.json reads X.Y.0-…); if it
already moved to a later line, stop — branching would ship that line's work.
- non-alpha on a frozen line → later release (2c).
- Never run in the user's checkout and never
git switcha localX.Y
branch: it may be checked out in another worktree. Each step that needs a
tree creates a detached worktree under .claude/worktrees/ and removes it
when done. Stage with git add -u, never git add -A.
2a. Alpha — tag `main`
No worktree needed.
- Every version file on
origin/mainmust read{VERSION}:
```bash
git grep -n '"version": \|packageVersion\|"package": ' origin/main -- package.json \
version.json manifest.json react/package.json packages/backend.ai-ui/package.json \
packages/backend.ai-docs-toolkit/package.json electron-app/package.json index.html
```
If not, stop: the bump PR for this alpha has not merged, or the requested
version skips one. Report which.
- Tag and push:
```bash
git tag v{VERSION} origin/main
git push origin v{VERSION}
```
{TARGET}ismain. Continue with step 4.
2b. First freeze — create (or catch up) the release branch
WT=.claude/worktrees/release-{VERSION}
origin/X.Ydoes not exist →git worktree add --detach "$WT" origin/main.origin/X.Yexists (an older run cut it at an alpha) →
git worktree add --detach "$WT" origin/X.Y, then in it
git merge origin/main -m "chore: merge main into X.Y for v{VERSION} release".
Conflicts confined to the version files are version/build stamps: take
origin/main's side (git checkout --theirs <file>, git add); step 3
rewrites them. Any other conflict: stop and report.
Continue with step 3.
2c. Later beta / rc / stable / patch
WT=.claude/worktrees/release-{VERSION}
git worktree add --detach "$WT" origin/X.Y
Do not merge main. Missing fixes are backported with
cherry-pick-to-release before cutting. Continue with step 3.
3. Release Commit (2b / 2c), in `$WT`
- Set
versionin rootpackage.jsonto{VERSION}with the Edit tool. make versiontag.- Commit, tag, and push branch and tag in one atomic push, so a rejected
branch push cannot leave a published tag on an orphan commit:
```bash
git add -u
git commit -m "release: v{VERSION}"
git tag v{VERSION}
git push --atomic origin HEAD:refs/heads/X.Y v{VERSION}
```
Rejected as non-fast-forward (a backport merged meanwhile): delete the local
tag, remove the worktree, and start again from step 1 — once. Any other
rejection (branch protection, permissions), or a second one: stop and report
the error. Never force-push.
cdback andgit worktree remove "$WT".{TARGET}isX.Y.
4. Create GitHub Release
Base tag = the nearest earlier tag by version, so a later line's tags (e.g.
next-line alphas on main) never qualify; versionsort.suffix=- sorts
X.Y.0-rc.N before X.Y.0. A line's first release takes the previous line's
last tag, which may sit on its release branch — its notes can then repeat
backports already shipped there; trim them in step 6. Run in one call:
PRIOR=$(git -c versionsort.suffix=- tag -l 'v[0-9]*' --sort=version:refname \
| sed -n "/^v{VERSION}\$/q;p")
case "{VERSION}" in
*-alpha.*|*-beta.*|*-rc.*) tail -1 <<<"$PRIOR" ;; # prerelease
*) grep -vE -- '-(alpha|beta|rc)\.' <<<"$PRIOR" | tail -1 ;; # stable
esac
Prerelease (alpha / beta / rc):
gh release create v{VERSION} --title "v{VERSION}" --generate-notes \
--notes-start-tag "$BASE_TAG" --target {TARGET} --prerelease
Stable — no --prerelease (a stable published as a prerelease is not
marked Latest, and the docs-archive workflow skips it). A patch on an older
line, when a higher stable tag already exists, adds --latest=false so it does
not take Latest from the newer line:
gh release create v{VERSION} --title "v{VERSION}" --generate-notes \
--notes-start-tag "$BASE_TAG" --target {TARGET} # [--latest=false]
As soon as it returns the URL, report it in a short standalone message
(✅ Release created: <url>), then continue without waiting.
5. Bump `main` (alpha and first freeze)
main is protected, so the bump is a PR. Until it merges, the next alpha
cannot be cut. Create the bump's own worktree first, and do every step
below inside it — never on the release branch:
BWT=.claude/worktrees/bump-{NEXT}
git worktree add -b chore/bump-{NEXT} "$BWT" origin/main
- After an alpha →
{NEXT}=X.Y.0-alpha.N+1, version files only: set
root package.json's version with the Edit tool, then make versiontag.
- After the first freeze →
{NEXT}= the next line'salpha.0
(26.10 → 26.11.0-alpha.0; ask the user when it is not obvious, e.g.
after .12). This bump also refreshes dependencies: bump-alpha-version
is not model-invocable, so Read
.claude/skills/bump-alpha-version/SKILL.md and follow its Process in
$BWT (version, make versiontag, dependency update within
minimumReleaseAge, pnpm install, typecheck, build).
Then, in $BWT:
git add -u
git commit -m "chore: bump to {NEXT}"
git push -u origin chore/bump-{NEXT}
Before gh pr create: the require-e2e-flow hook reads the branch from the
session's cwd, not from a cd inside the command, so switch the session
into $BWT first (EnterWorktree with path). Then record the e2e-flow check:
- alpha bump (version files only) →
bash "$(git rev-parse --show-toplevel)"/.claude/scripts/require-e2e-flow.sh --record;
- dependency-refresh bump → run the
e2e-flowskill; a dependency bump can
change a user flow, and its report becomes the PR body's E2E flow section.
gh pr create --draft --base main --title "chore: bump to {NEXT}" --body-file <body>
Body for an alpha bump (for a dependency refresh, list the updated packages
and replace the E2E flow section with what the e2e-flow skill reports):
Bump main to {NEXT} after cutting release v{VERSION}.
Version files only: package.json, version.json, index.html, manifest.json, react, backend.ai-ui, electron-app, backend.ai-docs-toolkit.
## E2E flow
Result: no flow change
Reason: version strings only; no UI or user flow changes.
No dev server or walkthrough for a version-only bump — nothing changes on
screen. Remove the worktree after the push: git worktree remove "$BWT".
6. Improve Release Notes
/fw:release-note v{VERSION}
Output Summary
In this order:
- Blocked on me — the bump PR link and "merge it before the next
alpha"; anything the run stopped on.
- Changed — version and tag (and the commit/branch it points at), base
tag, GitHub release URL, bump PR, release-notes rewrite.
- Found — conflicts resolved as stamps, skipped steps with a one-line
reason (e.g. dev server / walkthrough skipped: version-only change).
Examples
/create-release 26.4.0-alpha.2 (main reads 26.4.0-alpha.2, 26.4 not frozen)
tag v26.4.0-alpha.2 on origin/main → pre-release (base v26.4.0-alpha.1, target main)
→ bump PR main → 26.4.0-alpha.3 → /fw:release-note
/create-release 26.4.0-rc.0 (first freeze)
detached worktree at origin/main → release commit → atomic push of 26.4 + tag
→ pre-release (target 26.4) → bump PR main → 26.5.0-alpha.0 (deps refreshed)
→ /fw:release-note
/create-release 26.4.0 (26.4 frozen, fixes already cherry-picked)
detached worktree at origin/26.4 → release commit → atomic push
→ release (base: previous stable, target 26.4) → /fw:release-note
Notes
gitis used directly (notgh stack): releases are not feature stacks.- Never push to
maindirectly, never force-push a release branch or move a tag. - Confirm with the user before pushing if anything looks unexpected.