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

Publishing releases

Jin Lee edited this page Dec 13, 2022 · 11 revisions

❗ Publishing can only be done by Chan Zuckerberg Initiative employees with organization access in NPM ❗

Prerequisites

  1. Make sure you're in the chanzuckerberg organization on npm
  2. Turn on 2-factor authentication for npm

Update CHANGELOG (do this first)

For each package that will be updated, update its 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

Commit CHANGELOG updates directly to master before publishing releases. Ideally we could do this at the same time as the publish, but Lerna doesn't make that straightforward.

Publish (after changelogs have been updated)

  1. Make sure everything is green on CI
  2. Run yarn publish-packages. This uses Lerna to detect which packages have changed, and will prompt you for new version numbers.
  3. When choosing version numbers, use Semantic Versioning.
  4. The script will
    • Update package.json files with the new version numbers
    • Add the appropriate git tags
    • Push those git tags to GitHub
    • Publish the package to npm
Clone this wiki locally