Skip to content

build(release)!: merge a version bump, main releases itself - #664

Merged
jimhoyd merged 3 commits into
mainfrom
claude/release-rewrite
Sep 24, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/release-rewrite

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Second of three PRs; #663 (the add-on shape) is merged. This replaces the whole release pipeline, about 3,200 lines across dispatch, coordinator, candidate and rehearsal workflows, Changesets and peer floors.

One version.

  • Core and every add-on share one version.
  • npm run release:bump -- X is the only thing that changes it: every workspace manifest, exact core and sibling peers (siblings optional), the lockfile, cli.ts/mcp.ts, the starter's schema URL and action ref, the Claude plugin/marketplace and the doc version markers.
  • release-bump --check runs in CI.

A release is a merged bump PR. release.yml runs on every push to main:

Job What it does
plan Decides whether anything is left to publish.
ci Calls ci.yml via workflow_call with release: true, which selects the full matrix. ci.yml no longer runs on push to main, so main is verified once.
build release-pack: every add-on tarball; core carrying dist/addons.json that pins them by sha512 and release URL; SBOM; triage; Homebrew formula; SHA256SUMS. All attested.
publish GitHub Release with generated notes (this creates the tag) → public add-on URLs checked against the pins → core to npm via trusted publishing → Homebrew → GHCR.
verify Builds a fresh site from the public channels only (init, add every extension and artifact, list --strict, validate, single-copy check), then runs install.sh. On failure it opens a release issue.

Guarantees.

  • Core never reaches npm before the add-ons it pins are downloadable.
  • Every publishing step is idempotent, so "Re-run failed jobs" finishes a partial release.
  • Published assets are never replaced; a bad release is fixed forward with the next version plus npm deprecate.

Channels.

  • Stable versions go to npm latest and become GitHub latest.
  • X.Y.Z-alpha.N goes to npm alpha as a GitHub prerelease.

CI. build-fidelity now runs the real release packer twice from clean builds and compares the tarballs and pins. That replaces pack-sources.

Removed.

  • Workflows: release-core-dispatch.yml, candidate.yml, release-rehearsal.yml.
  • Scripts: release.ts, release-run.ts, release-prepare.ts, release-artifacts.ts, build-candidate.ts, prepare-core-release.sh, prepare-release-train.ts, peer-api.ts, check-release-tags.ts, pack-sources.mjs.
  • Changesets.
  • The dated docs/RELEASE-*.md drafts.

Real bugs found while writing it:

  • npm sbom --workspaces overflows the stack on the dependency-free artifact workspace (npm 11.19). The SBOM now names core and each extension instead.
  • build-fidelity built with a different Node than the release. Both now use .node-version.

Standalone template retired (fixes #666)

urlcode init creates a complete, pinned site from the installed runtime's own starter, so the separate urlcode-template repository is redundant.

  • Removed: the template job, release-template.ts and the helpers only it used (release-identity.ts, release-installability.ts), and starters/default/starter.json.
  • Docs: every pointer to the template is gone; onboarding is npx @jimhoyd/urlcode init <site>.
  • Secret: RELEASE_AUTOMATION_TOKEN is no longer used.

Fixes #666

Trade-off

This drops the Docker-pinned, byte-reproducible candidate. Builds run on the runner at the exact .node-version, and the outputs are attested. build-fidelity proves the packer is reproducible.

One-time settings (owner, not code)

  • Apply .github/rulesets/release-tags.json (done): v* tags cannot be updated or deleted. Delete the "Restrict release tag creation" ruleset: GitHub Actions cannot bypass it on a user-owned repository, so it would block the release from creating its tag.
  • release environment: main only, no reviewers.
  • Secrets: keep HOMEBREW_TAP_TOKEN; delete RELEASE_AUTOMATION_TOKEN.
  • Archive or delete the jimhoyd-com/urlcode-template repository.
  • Enable immutable releases.
  • npm trusted publisher: release.yml plus the release environment.
  • Create the release label.

Evidence

  • Lint, typecheck, npm run check (including release-bump --check), build and 788 root tests all pass.
  • verify:workspaces passes: every add-on suite, the descriptor check, the package audit and the real-npm integration test.
  • npm run test:package passes.
  • New tests: release-bump (17 tests), release-publish (10, with a fake runner: order, idempotency, refusals), workflows (7: the two-workflow shape, job and step order, permissions, pinned actions).
  • A local release-pack dry run produced 8 tarballs, https pins that match the core tarball, and a valid SHA256SUMS.
  • ci:build-fidelity is reproducible.

Not yet exercised: a real publish. The first real run will be the next bump PR.

🤖 Generated with Claude Code

jimhoyd and others added 3 commits September 24, 2026 12:31
One version for core and every add-on, changed only by `npm run release:bump`.
Merging the bump PR releases: release.yml (push to main) runs ci.yml once via
workflow_call, then build -> publish -> verify -> template.

- release-pack: every add-on tarball, core carrying dist/addons.json that pins
  them by sha512 and release URL, SBOM, triage, Homebrew formula, SHA256SUMS;
  attested. build-fidelity packs twice from clean builds and compares.
- release-publish (idempotent): GitHub Release with generated notes (creates
  the tag) -> public add-on URLs checked against the pins -> core to npm via
  trusted publishing -> Homebrew -> GHCR. verify installs a fresh site from the
  public channels; failures open a release issue.
- removed: the dispatch coordinator, signed candidate, rehearsal, release
  scripts, peer floors, tag-namespace checks, pack-sources and Changesets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`urlcode init` creates a complete, pinned site from the installed runtime's own
starter, so the separate urlcode-template repository and its release-time sync
are redundant. Remove the release `template` job, release-template.ts and the
helpers only it used (release-identity, release-installability), the starter's
starter.json, and every pointer to the template; onboarding is
`npx @jimhoyd/urlcode init <site>`. RELEASE_AUTOMATION_TOKEN is no longer used.

Fixes #666

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GitHub refuses GitHub Actions as a bypass actor on a user-owned repository, so a
creation ruleset would stop release.yml from creating its tag. Tags are created
only by the publish job (the one job with contents: write, in the main-only release
environment); the immutable-tags ruleset still forbids updating or deleting any v*
tag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd force-pushed the claude/release-rewrite branch from f15e6f0 to 9569aa0 Compare September 24, 2026 17:31
@jimhoyd
jimhoyd merged commit ee65563 into main Sep 24, 2026
23 checks passed
@jimhoyd
jimhoyd deleted the claude/release-rewrite branch September 24, 2026 17:35
@jimhoyd jimhoyd mentioned this pull request Sep 24, 2026
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.

[Request]: move urlcode-template to the site layout before the first release of #663–#665

1 participant