Skip to content

ci: run the release through the shared changesets-release workflow - #115

Merged
whatsaaaa merged 1 commit into
mainfrom
fm/fb-tmpl-release
Nov 18, 2026
Merged

whatsaaaa merged 1 commit into
mainfrom
fm/fb-tmpl-release

Conversation

@whatsaaaa

Copy link
Copy Markdown
Owner

Intent

Move form-builder's release onto the shared changesets-release.yml@v1 workflow of whatsaaaa/template, after a pack dry run shows the packages pack the same through it, and only if it covers everything today's release does. This is step (5) of the move to the shared template, after the tool bumps, flat/recommended, the shared config packages and the shared CI. It changes no source, adds no changeset and triggers no release.

What changed

.github/workflows/release.yml is now a caller of whatsaaaa/template/.github/workflows/changesets-release.yml@v1, in the shape the template's Copier release.yml renders (the same file design-system has used since whatsaaaa/design-system#57). The file keeps its name, which npm's trusted publisher checks.

Today's release Through the shared workflow
select-mode, version, pack, publish jobs, changesets/action/*@v2 release / select-mode, release / version, release / pack, release / publish, changesets/action/* pinned to v2.1.2 (the commit @v2 resolves to today)
checkout without persisted credentials, pnpm, Node 24 without a cache, pnpm install --frozen-lockfile the shared setup action with cache: false, the same steps
pnpm build, then changesets/action/pack changesets/action/pack alone: each package's prepack (tsdown) builds it, as it already did a second time today. The dry run below shows the tarballs are byte-identical
publish in the npm environment, id-token: write, contents: write the shared publish job declares environment: npm (a calling job cannot set one) and asks for the same permissions, which the caller grants

Every requirement the release has today, and where the shared workflow covers it:

  • Several packages. changeset pack and changeset publish read the publish plan for the whole workspace; the dry run packs all five published packages through it.
  • Pre mode with the rc tag. The changesets CLI reads .changeset/pre.json itself, in changeset version and when select-mode builds the publish plan (each release's tag is the pre state's rc); the workflow passes nothing for it, today or through the shared one.
  • Trusted publishing with provenance in the npm environment. npm validates the calling workflow's file name (release.yml, kept) and the job's environment (npm, declared on the shared publish job). id-token: write is granted by both the caller and the shared publish job, as npm requires for a reusable workflow. Provenance comes with trusted publishing through the same changesets/action/publish as today. The trusted publisher on npm and the npm environment with its required reviewer stay as they are.
  • CI on the Version Packages pull request. The shared version job starts ci.yml on changeset-release/main through workflow_dispatch, which ci.yml already has. Every check the main ruleset requires is a job in ci.yml, with no pull_request-only condition, so all of them report on that pull request's head commit. Today's release does not do this; it is the one behaviour the shared workflow adds, and the reason the caller grants actions: write. On design-system's open Version Packages pull request (Version Packages design-system#65) the dispatched run reports ci / check and ci / browser on its head commit, marked required.

No gap, so nothing is left for a template follow-up.

Pack dry run

Same checkout, same lockfile, both flows run through changeset pack (what changesets/action/pack runs) with a publish plan naming all five published packages at their current versions and the rc tag, since all of them are already on npm and an unplanned pack finds nothing to pack:

  1. today's flow: pnpm install --frozen-lockfile, pnpm build, changeset pack --from-publish-plan <plan> --out-dir <tmp>/today;
  2. the shared flow: every dist/ removed, then changeset pack --from-publish-plan <plan> --out-dir <tmp>/shared (only prepack builds).
Package Files in the tarball sha256 today / shared
@whatsaaaa/form-builder-schema@1.0.0-rc.3 LICENSE, README.md, package.json, definition.schema.json, dist/index.{js,js.map,d.ts}, dist/json-schema.{js,js.map,d.ts}, dist/json-layout-DDxMYHJU.{js,js.map}, dist/form-rule-def-DFINV_M0.d.ts 6e07ccbee6c7e5ad… both
@whatsaaaa/form-builder-affects@0.2.2-rc.0 LICENSE, README.md, package.json, definition.schema.json, dist/index.{js,js.map,d.ts} 442bf74d3847cf27… both
@whatsaaaa/form-builder-fills@0.1.0-rc.0 LICENSE, README.md, package.json, definition.schema.json, dist/index.{js,js.map,d.ts} a375125491ee9a23… both
@whatsaaaa/form-builder-vue@1.0.0-rc.3 LICENSE, README.md, package.json, dist/index.{js,js.map,d.ts} 5924797b29295f9c… both
@whatsaaaa/form-builder-react@1.0.0-rc.3 LICENSE, README.md, package.json, dist/index.{js,js.map,d.ts} 264b8725dc1a4e63… both

The two sets of tarballs are byte-identical (same sha256, and diff -r of the extracted trees finds nothing), so the packed package.json files are the same too: exports from publishConfig.exports (dist), files, publishConfig.access: public, the peers and versions. The publish-plan.json each run wrote carries the same integrity hashes. Run locally with Node 26 and pnpm 12.18.0 (CI uses Node 24 for both flows alike). No package needs another's dist to pack, since inside the workspace their exports point at src.

Checks

  • actionlint 1.7.12 with the template's config: clean on all workflows.
  • The template's tests/template/check-callers.py at v1: "2 call(s) of the reusable workflows match them" (inputs, permissions, the dispatched ci.yml and its workflow_dispatch trigger).
  • pnpm format:check, pnpm lint with a clean tree after it.

After merging

No changeset is pending and every package version is already on npm, so the push to main runs release / select-mode only and publishes nothing. No package has published through changesets-release.yml@v1 yet (design-system has versioned through it, not yet published), so form-builder's next publish, or design-system's first, is the live proof of trusted publishing from the shared workflow. If it failed, the publish job would stop at the OIDC exchange with nothing published, after the npm environment's reviewer approved it, and reverting this PR restores the old release.

The release jobs' check names change from select-mode, version, pack, publish to release / …; none of them is required by the main ruleset.

@whatsaaaa
whatsaaaa merged commit c557b02 into main Nov 18, 2026
13 checks passed
@whatsaaaa
whatsaaaa deleted the fm/fb-tmpl-release branch November 18, 2026 15:10
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