ROSA · Documentation
Release guide (maintainers)
ROSA ships one release per version, multi-artifact: a single tag produces the
npm package (@rosa-mcp/server on npmjs, via Trusted Publishing), a multi-arch
Docker image on GHCR, and native executables on the GitHub Release. Releases are
driven by Changesets — the same
mechanism as ClementRingot/LISA.
- Pipeline overview
- The normal flow
- The changeset guard
- What the release workflow does
- One-time setup (bootstrap)
- Manual fallback
- If a job fails mid-release
Pipeline overview
flowchart TD
pr["PR with a changeset<br/>(.changeset/*.md)"] --> merge["merge to main"]
subgraph train["changesets.yml (changesets/action, auth: GitHub App)"]
direction TB
ver["pending changesets → maintains the<br/>chore(release): version packages PR<br/>(bumps package.json + CHANGELOG,<br/>mirrors mta.yaml + README, refreshes lockfile)"]
tagjob["no pending changesets → tag-missing-releases.mjs<br/>pushes vX.Y.Z"]
end
merge --> ver
ver -->|merge the version PR| tagjob
tagjob -->|tag triggers| rel
subgraph rel["release.yml (on tag v*)"]
direction TB
build["build — install, verify version==tag, test, upload dist"]
build --> npmp["npm-publish — npmjs (OIDC, idempotent)"]
build --> docker["docker — buildx multi-arch → GHCR"]
build --> bins["binaries — pkg x3 + SHA256SUMS → GitHub Release"]
end
The normal flow
A release is a changeset plus two PR merges, no local release commands.
- Every PR that changes shipped code includes a changeset (
npx changeset) describing the change and its bump level (patch/minor/major). TheguardCI check enforces this. - On each push to
main,changesets.ymlrunschangesets/action:- pending changesets → it opens/updates a
chore(release): version packagesPR that runsnpm run changeset:version(bumpspackage.json, writesCHANGELOG.md, mirrorsmta.yaml+ the README_X.Y.Z.mtarreferences, and refreshespackage-lock.json). - no pending changesets (right after that PR merges) → it runs
scripts/tag-missing-releases.mjs, which pushes the canonicalvX.Y.Ztag for the committed version.
- pending changesets → it opens/updates a
- The pushed tag triggers
release.yml— the four jobs below build and publish all artifacts.
So the only human steps are merging the PR and merging the version PR.
Auth: a GitHub App, not a PAT. A tag pushed with the default
GITHUB_TOKENdoes not trigger other workflows (GitHub anti-recursion), so the Changesets workflow authenticates as a GitHub App whose token does triggerrelease.yml— and never expires. Set the repo variableRELEASE_APP_IDand secretRELEASE_APP_PRIVATE_KEY(see bootstrap). WhileRELEASE_APP_IDis unset it falls back togithub.token: the version PR still works, but a tag it pushes won’t triggerrelease.yml— start it manually then (see manual fallback).
The changeset guard
A PR that changes what ROSA ships must carry a changeset, so a version bump
can never be silently forgotten — most often a Dependabot dependency bump.
scripts/require-changeset.mjs runs on every
PR (the guard job in ci.yml).
Shipped = non-test files under src/**, sap_abbreviation_dictionary.json,
runtime dependency ranges in package.json, any version change in the production
closure of package-lock.json, or the Dockerfile (helpers + tests in
scripts/lib/shipped-deps.mjs).
- Add a changeset:
npx changeset(pick the bump level). - Escape hatch: to merge a shipped change without releasing it, add an
empty changeset:
npx changeset add --empty. The guard passes with a note. - Dependabot PRs that touch shipped deps therefore need a changeset added by hand (or an empty one) before they can merge — the deliberate trade-off that stops a dependency bump from shipping unreleased.
What the release workflow does
release.yml (trigger: tags v*) has four jobs:
- build (gate) —
npm ci, fail ifpackage.jsonversion ≠ tag, build, test, uploaddist/. Nothing publishes unless this passes. - npm-publish — publishes
@rosa-mcp/serverto npmjs via Trusted Publishing (OIDC) — no token; provenance attached. Idempotent: it skipsnpm publishif that version is already on npm. - docker — buildx + QEMU multi-arch (
linux/amd64,linux/arm64) → GHCR, tagged{version},{major}.{minor},latest. - binaries — cross-compiles the three native executables, writes
SHA256SUMS.txt, and creates the GitHub Release with auto-generated notes.
One-time setup (bootstrap)
1. First npm publish + Trusted Publisher
npmjs can only configure a Trusted Publisher for a package that already exists, so the first publish is manual:
npm publish --access public # with a short-lived granular token, deleted right after
Then on npmjs.com → the package → Settings → Trusted Publisher → add a
GitHub Actions publisher: repository ClementRingot/ROSA, workflow
release.yml. Delete the token. The @rosa-mcp npm org/scope must exist.
2. GHCR image visibility
The GHCR container image is private by default — make it public once: org/user
Packages → rosa (container) → Package settings → Change visibility → Public.
(The npmjs package is public via publishConfig.access=public.)
3. Release GitHub App
Create/reuse a GitHub App (Settings → Developer settings → GitHub Apps) with
Contents: RW and Pull requests: RW, no webhook; install it on this repo.
Then set the repo variable RELEASE_APP_ID (numeric App ID) and secret
RELEASE_APP_PRIVATE_KEY (a generated .pem). The same App can serve LISA and
ROSA. No PAT, nothing to rotate.
Manual fallback
If the App isn’t configured (or to cut a release by hand):
npm run changeset:version # applies pending changesets: bump + CHANGELOG + mirrors
git commit -am "chore(release): version packages" && git push
git tag -a v$(node -p "require('./package.json').version") -m "vX.Y.Z"
git push origin --tags # pushing as your user triggers release.yml
If a tag was created by the workflow’s github.token fallback and didn’t trigger
release.yml, re-push it locally (a push from your account triggers it).
If a job fails mid-release
The four jobs are independent after the build gate, so a partial release is
possible. Re-run the failed job from the Actions run:
- npm-publish is idempotent — a re-run skips publish if the version is already on npm (so re-running the whole workflow is safe).
- docker and binaries overwrite their tags / release assets.
- Wrong version tagged — delete the tag and Release, fix, and re-tag:
git push --delete origin vX.Y.Z
This page comes from the ROSA repository and follows its main branch.
