Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Publish versions

esdmr edited this page Aug 25, 2021 · 4 revisions

How to publish a version

1: Apply the Changesets

Run pnpm run changeset:version.

2: Commit all the changes

  1. Add all the changes: git add ..
  2. Commit all the changes: git commit.

3: Update/Create the release branches

3-1: Major changes

The release branch should not exist. If it does, remove it before continuing.

Run git branch releases/<MAJOR> master where <MAJOR> is the new major version. Finally, run git checkout master to return to the master branch.

3-2: Patch or minor changes

The release branch should already exist. If not, follow the subsection above.

Run git fetch . master:releases/<MAJOR> where <MAJOR> is the current major version.

4: Push all the branches

Run git push origin --all --set-upstream.

Note: This will run the CI to update the documentation. Please wait until the CI is passing before continuing.

5 (Optional): Deleting unsupported old releases

It is recommended to support the last two or three major versions, this means that bug fixes and security updates can be backported via release branches.

If you do not plan to support a previous release, you must delete its branch. This will cause the related documentation to be pruned on the next CI run.

  1. Remove the branch locally: git branch -d releases/<OLD_MAJOR>, where <OLD_MAJOR> is the unsupported major version.
  2. Remove the branch on the remote: git push --delete releases/<OLD_MAJOR>.

6: Publish the new version on npm

This can not be undone easily, double check if everything is correct.

Run pnpm publish.

Clone this wiki locally