@khanakia/sql-schema-core and @khanakia/sql-schema-react are released to npm with Changesets — the same flow vercel/ai uses. The web app (apps/web) is private / ignored and never published; it deploys to GitHub Pages separately.
Tags are per-package, no leading v — e.g. @khanakia/sql-schema-core@0.2.0, @khanakia/sql-schema-react@0.2.0.
flowchart LR
PR["PR with a changeset<br/>(pnpm changeset)"] --> M["merge to main"]
M --> A["release.yml<br/>changesets/action"]
A --> VP["opens/updates<br/>Version Packages PR"]
VP --> MV["merge that PR"]
MV --> A2["release.yml runs again"]
A2 --> T["bump versions + CHANGELOG<br/>tag pkg@x.y.z + GitHub Release"]
T --> NP["pnpm changeset publish → npm (provenance)"]
- Make a change in a PR. Record it:
Pick the bumped packages and patch/minor/major, write a one-line summary. This adds a
pnpm changeset # or: task changeset.changeset/*.mdfile — commit it with your PR. - Merge the PR to
main.release.yml(Changesets action) opens or updates a "Version Packages" PR that applies all pending changesets (version bumps +CHANGELOG.md). - Merge the "Version Packages" PR. The action then:
- tags each package
@khanakia/sql-schema-core@x.y.zetc., - creates a GitHub Release per package,
- runs
pnpm run release→build:libs+changeset publish→ publishes to npm with provenance.
- tags each package
No manual version edits, no manual tags. react's workspace:* dep on core is rewritten to the published version automatically.
- npm Automation token → repo secret
NPM_TOKEN. Must be a Classic Automation token (Account → Access Tokens → Classic Token → Automation). Granular / Publish tokens fail in CI withnpm error code EOTP — requires a one-time password.gh secret set NPM_TOKEN --repo khanakia/sql-schema-visualizer - Repo setting (required for the Version Packages PR): Settings → Actions → General → Workflow permissions → enable "Allow GitHub Actions to create and approve pull requests".
- Both libs declare
publishConfig.access: public+ repository/homepage/bugs;.changeset/config.jsonignores@khanakia/sql-schema-web.
@khanakia/sql-schema-core@0.1.0 and @khanakia/sql-schema-react@0.1.0 are already published (initial manual release, with provenance). All subsequent releases go through the Changesets flow above.
If the action is unavailable:
npm login # account in the @khanakia org
pnpm changeset version # apply changesets → bump + changelog
pnpm run release # build:libs + changeset publish
git push --follow-tags
(task publish:local does the build + changeset publish part.)
npm view @khanakia/sql-schema-core version
npm view @khanakia/sql-schema-react version
or https://www.npmjs.com/settings/khanakia/packages. New-scope packages can take a few minutes to appear on the read replica even though npm publish succeeded — npm pack <pkg>@<version> is the authoritative check.
Independent per-package SemVer (Changesets default). Pre-1.0: minor = features, patch = fixes, breaking allowed in minors. CHANGELOGs are generated from changeset summaries via @changesets/changelog-github.