Skip to content

feat(release): single-source-of-truth version bumper + CI consistency gate#35

Merged
GuilhermeVozniak merged 2 commits into
mainfrom
feat/release-version-sync
May 22, 2026
Merged

feat(release): single-source-of-truth version bumper + CI consistency gate#35
GuilhermeVozniak merged 2 commits into
mainfrom
feat/release-version-sync

Conversation

@GuilhermeVozniak
Copy link
Copy Markdown
Collaborator

Summary

Version strings lived in five places that drifted independently — desktop npm, landing npm, tauri.conf.json, Cargo.toml, Cargo.lock — plus every landing page hardcoded <Footer version="0.1.0" />. By the time the desktop hit 0.1.4 the deployed landing was still rendering "v0.1.0" while the latest.json manifest said something else again.

Changes

  • scripts/bump-version.ts — touches all 5 manifests atomically.
    • bun run version:bump 0.2.0 → updates everywhere.
    • bun run version:check → verifies all agree (no arg) or all equal a given version.
    • Validates semver, refuses to write if any target's regex misses.
  • packages/landing/src/lib/version.ts — exports APP_VERSION from packages/landing/package.json. All four landing pages now pass <Footer version={APP_VERSION} /> instead of a literal, so a bump automatically updates what users see on the site.
  • .github/workflows/release.yml — new verify-versions job at the top of the workflow runs version:bump --check <tag> against the release tag. Drift fails the workflow before burning ~15 runner-minutes producing mismatched artifacts.
  • Caught the existing drift: landing package.json bumped 0.1.0 → 0.1.4 to match.
  • CONTRIBUTING.md documents the new release flow.

Test plan

  • bun scripts/bump-version.ts --check (passes; all 5 now at 0.1.4)
  • bun --cwd packages/landing run test:unit (35/35)
  • bun --cwd packages/landing run build (clean static export)
  • bun run lint clean
  • Next release: kicks off the verify-versions gate; mismatched tag fails fast

🧙 Built with WOZCODE

… gate

Version strings lived in 5 places that drifted independently: desktop
npm manifest, landing npm manifest, tauri.conf.json, Cargo.toml, and
Cargo.lock. On top of that, the landing pages hardcoded "0.1.0" in
each `<Footer version=... />` call. Result: by the time desktop reached
0.1.4, the landing was still rendering "v0.1.0", and the latest.json
manifest's version disagreed with what the user saw on the page.

Changes:

- `scripts/bump-version.ts` — touches all 5 manifests atomically. Also
  exposes `--check` (verify all agree) and `--check <semver>` (verify
  all equal a given target). Validates semver, refuses to write if any
  target's regex misses (catches manifest format drift).

- Root `package.json` scripts: `version:bump` and `version:check`.

- `packages/landing/src/lib/version.ts` — exports `APP_VERSION` read
  from `packages/landing/package.json` at build time. Every landing
  page now passes `<Footer version={APP_VERSION} />` instead of a
  literal — so a `version:bump` automatically updates what the user
  sees on the deployed site.

- `.github/workflows/release.yml` — new `verify-versions` job runs
  before the build matrix. It pulls the tag, strips the `v`, and runs
  `bump-version.ts --check <version>`. Any drift fails the workflow
  before burning ~15 runner-minutes on a 3-platform Tauri build that
  would publish mismatched artifacts.

- This commit also catches the existing drift up: landing package.json
  bumped 0.1.0 → 0.1.4 to match the rest.

- `CONTRIBUTING.md` documents the new release flow.

Co-Authored-By: WOZCODE <contact@withwoz.com>
@github-actions
Copy link
Copy Markdown

Landing preview will be available at https://bluemacaw.com/previews/pr-35/ once AWS infra lands (Plan D).

The verify-versions job enforced tag==manifest equality unconditionally.
On a workflow_dispatch dry-run the placeholder tag (v0.0.0-test) never
matches the real manifest version, so the gate failed and skipped the
whole build — defeating the "test-fire the pipeline" purpose of the
manual trigger.

Now: real `release` events still require every manifest to equal the
tag; dry-runs only verify the manifests agree with each other and never
block on a tag mismatch.

Co-Authored-By: WOZCODE <contact@withwoz.com>
@GuilhermeVozniak GuilhermeVozniak merged commit a050e34 into main May 22, 2026
9 checks passed
@GuilhermeVozniak GuilhermeVozniak deleted the feat/release-version-sync branch May 22, 2026 11:35
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