Skip to content

Publish a release

Andrew Huth edited this page May 17, 2023 · 6 revisions
  1. Make sure everything is green on CI

  2. Update the version number in the package.json, following semver

  3. Run npm install, which updates the package-lock.json with the updated version number.

  4. Update the CHANGELOG.md file. Add a heading for the new version and the release date below the "unreleased" heading. Move any items in the "unreleased" section into the section for the new version, along with any other items that will be in the release.

    For example, if the CHANGELOG looks like

    ## Unreleased
    - My awesome new feature
    
    ## v6.6.6 (1984-12-21)
    - A really old feature

    You would update it as follows for v6.7.0

    ## Unreleased
    
    ## v6.7.0 (2020-12-04)
    - My awesome new feature
    
    ## v6.6.6 (1984-12-21)
    - A really old feature
  5. Create a commit (with the updated version number and changelog entry) directly on the main branch, with the version number as the commit message. This should be preceded by v. For example, for version 6.6.6, the commit message should be v6.6.6

  6. Push this commit

  7. Go to the releases page and draft a new release

  8. Enter the version (i.e. v6.6.6) into the "tag version" and "release title" fields

  9. Copy the version's content from the CHANGELOG into "describe this release".

  10. Click "publish release". This will create a tag for the version

  11. From your terminal, run git pull to pull down the tag

  12. Run npm publish --dry-run to see what files will be published

  13. If everything looks good, run npm publish (you may have to do some npm setup for this to work)

Clone this wiki locally