CapabilityKit publishes two public npm packages:
@capabilitykit/core@capabilitykit/cli
The GitHub Actions publish workflow publishes @capabilitykit/core first because @capabilitykit/cli depends on it.
Runs automatically when a tag matching v* is pushed.
- Steps:
npm ci->test->build->capabilitykit validate->capabilitykit compile->publint->attw-> publish both workspaces - Publishes
@capabilitykit/corefirst, then@capabilitykit/cli - Uses npm trusted publishing with GitHub Actions OIDC
Configure trusted publishing on npmjs.com for both packages before relying on the workflow:
- Open each package on npmjs.com.
- Go to package settings, then Trusted Publisher.
- Add a GitHub Actions trusted publisher with:
- Organization/user:
FocusedObjective - Repository:
capabilitykit - Workflow filename:
publish.yml
- Organization/user:
The workflow has id-token: write, which is required for OIDC trusted publishing. Do not add a long-lived NODE_AUTH_TOKEN unless you intentionally choose token-based publishing instead.
-
Make sure you are on
mainwith a clean working tree. -
Update both workspace package versions:
npm version patch --workspace @capabilitykit/core --no-git-tag-version npm version patch --workspace @capabilitykit/cli --no-git-tag-version npm install
Replace
patchwithminorormajorwhen appropriate. -
If the CLI should depend on the exact new core range, update
packages/cli/package.jsonbefore runningnpm install.Example:
"@capabilitykit/core": "^0.1.2"
-
Verify locally:
npm run verify npm pack --workspace @capabilitykit/core --dry-run npm pack --workspace @capabilitykit/cli --dry-run
-
Commit the release prep:
git status git add package-lock.json packages/core/package.json packages/cli/package.json git commit -m "Release 0.1.2"
Adjust the version in the commit message.
-
Create and push the version tag:
git tag -a v0.1.2 -m "Release 0.1.2" git push origin main --follow-tags
-
Monitor the run at:
https://github.com/FocusedObjective/capabilitykit/actions
Registry metadata can lag for a few minutes. After publishing, check:
npm view @capabilitykit/core version
npm view @capabilitykit/cli version
npx @capabilitykit/cli --versionIf npm view returns 404 immediately after a successful publish, wait and retry. Also confirm npm sees the packages under the org:
npm access list packages @capabilitykit
npm dist-tag ls @capabilitykit/core
npm dist-tag ls @capabilitykit/cliDo not run npm publish locally for normal releases. The Action handles publishing.
Published npm versions are immutable. If a package version has already been published, fixes require a new version number.
Do not publish the root package. The root package.json is private and only coordinates the workspace.