This repository uses Changesets for release coordination.
Normal feature and fix pull requests:
- Add a changeset with
npm run changesetwhen the change should publish a new package version. - Merge the pull request into
main.
What happens after merge:
- The
Release ManagementGitHub Actions workflow runs onmain. - Changesets creates or updates the
Release packagepull request. - That release pull request contains the version bump and changelog updates.
- Merge the
Release packagepull request when you are ready to publish. - The merge publishes the package to npm under the
latestdist-tag, creates the matching GitHub release, and creates thev<version>git tag.
Important notes:
- The release artifact is a pull request, not a GitHub issue.
- CI requires a changeset on pull requests targeting
main, except for the auto-generatedchangeset-release/*release pull request. - The stable publish path is implemented in
.github/workflows/release.yml.
Beta releases are manual on purpose.
- Go to GitHub Actions and run the
Release Managementworkflow manually. - Choose the git ref to publish from. The default is
main. - Choose the npm dist-tag. The default is
beta.
What happens during the workflow:
- The workflow validates the selected ref with the normal repository checks.
- Pending changesets are converted into a snapshot prerelease version such as
0.2.0-beta.20260407170000. - The package is published to npm using the selected dist-tag, usually
beta. - GitHub creates a prerelease entry and a matching
v<version>tag.
Important notes:
- Beta publishes do not commit prerelease state back to the branch.
- Stable and beta publishes share the same workflow file because npm trusted publishing is configured per workflow path.
Before the first automated publish:
- Preferred: configure npm trusted publishing for this package and allow the
workflow
.github/workflows/release.ymlin the npm package settings. - Alternative: set the GitHub Actions secret
NPM_TOKENwith publish access to@ontos-ai/knowhere-sdk. The workflow maps that secret toNODE_AUTH_TOKENfornpm publish. - Provenance is currently disabled because npm does not accept GitHub Actions
provenance from private source repositories. Re-enable
--provenanceif this repository becomes public.
npm run changeset: create a release note and semver bump entrynpm run release:version: runchangeset versionnpm run release:publish: publish a stable release and create the GitHub releasenpm run release:beta: publish a beta snapshot and create the GitHub prerelease