Skip to content

How to release a new version of Smart Link SDK

Vladislav Bulyukhin edited this page Jul 22, 2024 · 1 revision

How to release a new version of Smart Link SDK

The repository supports both automatic and manual release methods for publishing the npm package. Automatic release is recommended. Manual release steps are provided for information purposes.

Automatic release

The repository uses a GitHub Action for automatic publishing. The pipeline configuration can be found here. The automatic release requires the NPM_API_KEY secret to be set in the repository/organization settings.

Step-by-step guide

  1. Create a new branch from master. For example, release-x.x.x.
  2. Ensure all tests pass and everything works as expected.
  3. Update CHANGELOG:
    • Add a new version tag in the CHANGELOG file, e.g., [1.2.3].
    • Move all changes from [Unreleased] to this new tag.
    • At the end of the file, add a link for the new tag, e.g., [1.2.3](https://...).
  4. Run npm version [patch|minor|major] to update the package version and create a new tag.
  5. Push your changes to the repository, create a PR and merge it.
  6. Create GitHub release:
    • Use the new version as the release and tag name.
    • For @next tag releases (e.g., beta versions), mark the release as pre-release. Otherwise, mark it as latest.
  7. Wait for the GitHub Action to start and release the package. Monitor its progress on the Actions tab.

Manual release

If needed, you can release a new version manually. Ensure your npm account is included in the collaborators list of the Kontent.ai organization.

Stable release

  1. Follow steps 1 to 5 from the Automatic Release section.
  2. Run npm publish --dry-run to verify the package is ready for publishing.
  3. If the dry run is successful, publish the new version using npm publish.

Dev release (dev, alpha, beta, next)

  1. Create a new release branch from master or your working branch. For example, release-x.x.x-next.x.
  2. Ensure all tests pass and everything works as expected.
  3. Run npm version [prerelease|prepatch|preminor|premajor] --preid=next to update the package version.
  4. Push your changes to the repository and open a PR.
  5. Publish the package using npm publish --tag next.
  6. Merge your PR.

Additional information