Drop the workflows into .github/workflows/ and tegami.mts into scripts/. All jobs run on Bun via oven-sh/setup-bun@v2, and actions are pinned to current majors (checkout@v6, setup-node@v6).
| File | Trigger | Purpose |
|---|---|---|
ci.yml |
push / PR to main, manual |
Lint + test + typecheck (add a build step for publishable packages). |
release.yml |
push to main |
Tegami: opens a "Version Packages" PR when changelogs are pending, otherwise publishes. Uses npm trusted publishing (OIDC) — no NPM_TOKEN. |
tegami-pr.yml |
PR | Builds a release-preview artifact. Runs untrusted PR code but stays read-only. |
tegami-pr-comment.yml |
workflow_run of the above |
Posts the preview as a PR comment with write perms, without running PR code. |
tegami.mts |
— | The Tegami config itself. Goes to scripts/tegami.mts; fill in <owner>/<repo> and <primary-package>. |
- Release tooling is Tegami, the successor to Changesets. Config lives in
scripts/tegami.mts(all packages share one version viagroups: { all: { syncBump: true } },npm.client: 'bun',github()plugin). If you prefer Changesets,/migrate-from-changesetsgoes the other way — but the house default is Tegami. - Version-PR titles carry the version. Tegami's default title is a flat "Version Packages"; the
versionPr.create()hook integami.mtsmakes itchore: release v<version>, so the merge commit onmainsays which release it was.createruns after the draft is applied, so read the bumped version offthis.graph— don't callbumpVersion()there or you bump twice. - Repos that ship an app rather than npm packages (every workspace package
private: true) also wantgithub({ release: false }), and let a tag-triggeredrelease.ymlown the git tag and artifacts — Tegami's npm provider refuses to tag/release a private package. - npm trusted publishing: configure the package on npmjs.com to trust this repo's
release.yml. Theid-token: writepermission is what enables OIDC; no secret token is stored. - The PR-preview split (
tegami-pr.yml+tegami-pr-comment.yml) is deliberate: the workflow that runs untrusted PR code has read-only perms; the one with write perms never runs PR code. Keep them paired. - For sites, add a
deploy-docs.ymlthat builds the Astro docs and deploys to GitHub Pages (actions/deploy-pages,concurrency.group: pages).