Skip to content

fix(release): keep finalize versions on main - #1437

Merged
christso merged 1 commit into
mainfrom
finalize-main-version
Jun 19, 2026
Merged

fix(release): keep finalize versions on main#1437
christso merged 1 commit into
mainfrom
finalize-main-version

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

Finalizing a prerelease now leaves the stable package versions on main instead of only on a detached release tag. The release script still promotes the exact prerelease tag: it requires main to point at that tag before creating a new stable release commit, and it refuses to finalize if additional commits have landed first.

If a stable tag was already created by the old detached flow, rerunning finalize fast-forwards main to that existing release commit. The publish workflow now resolves and validates the prerelease tag without checking it out, so release.ts can commit and push the stable versions on main.

Validation

  • bunx biome check scripts/release.ts
  • bunx tsc --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --types bun --strict --skipLibCheck scripts/release.ts
  • bun -e "import { readFileSync } from 'node:fs'; import { parse } from 'yaml'; parse(readFileSync('.github/workflows/publish.yml', 'utf8'));"
  • git diff --check
  • Disposable local git release simulation:
    • old finalize left origin/main at 2.0.0-next.1 while pushing v2.0.0
    • new finalize pushed origin/main and v2.1.0 at stable version 2.1.0
    • existing stable tag recovery fast-forwarded origin/main to 2.2.0
    • finalize refused when main moved past v2.3.0-next.1

Compound Engineering
GPT-5

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: ddee077
Status: ✅  Deploy successful!
Preview URL: https://2737618c.agentv.pages.dev
Branch Preview URL: https://finalize-main-version.agentv.pages.dev

View logs

@christso
christso merged commit 565ab75 into main Jun 19, 2026
8 checks passed
@christso
christso deleted the finalize-main-version branch June 19, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant