Releasing

Every @surfaces-ui/* package and create-surfaces is published together at one version (the fixed group in .changeset/config.json). The apps (apps/playground, apps/e2e, apps/recipes) are private and never published.

Each change

A change a consumer would notice gets a changeset in its pull request:

bash
pnpm changeset

CI runs pnpm check:release on every pull request, before and after a trial changeset version, so anything that would stop a publish (a missing license, description, files, repository or public access, or a package outside the shared version) fails there and not on release day.

Cutting a release

  1. On GitHub, open Actions, choose Release and run it on main. With changesets pending it opens a "Version packages" pull request: versions, changelogs and the lockfile.
  2. Review and merge that pull request.
  3. Run Release on main again. It builds, tests, runs scripts/check-release.mjs and publishes every package whose version is not on npm yet, with provenance.
  1. Run Desktop bundle on main. It packs surfaces.mcpb, the one-file install for the Claude desktop app (packages/mcp/desktop), and attaches it to a GitHub release named desktop-v<version>. It refuses to run until that version of @surfaces-ui/mcp is on npm, because the bundle starts it from there. Not yet run.

pnpm version-packages also sets the version of @surfaces-ui/mcp the surfaces-analytics plugin starts and raises the plugin's own version (scripts/check-plugins.mjs --write), so the plugin follows the release; Claude's directory picks the new commit up from main, and until the packages are published that pinned version is not on npm yet, so publish straight after merging.

By hand, the same is pnpm version-packages, then pnpm release (provenance needs CI, so publish from the workflow).

How the workflow reaches npm

  • First release: a token. Make a granular access token on npmjs.com with read and write access to the @surfaces-ui scope and to create-surfaces (it is a new package, so give it "all packages" for the first run), allowed to publish without a one-time code, with a short expiry. Save it as the repository secret NPM_TOKEN. Delete the secret and the token once the release is out.
  • Every release after: trusted publishing. On npmjs.com, in each package's settings, add a trusted publisher: GitHub Actions, organisation teradata-labs, repository surfaces-ui, workflow release.yml. The workflow then signs in with its own short-lived identity and keeps no secret. A package added later must be published once with a token before it can trust the workflow.

For the run to open the pull request in step 1 itself, the repository setting "Allow GitHub Actions to create and approve pull requests" (Settings, Actions, General) must be on. Where it is off (an organisation can lock it off), the run still pushes the branch changeset-release/main, ends green, and its summary has a link that opens the pull request for you: one click, then carry on from step 2. A pull request opened this way by a person also runs CI, which one opened by the workflow's own token would not.