Skip to content

NPM Package Release Process

0xdavinchee edited this page Jul 11, 2023 · 3 revisions

Background

This page goes over how to carry out a package release for an existing npm package. The process of releasing an already-bootstrapped package to npm is fairly straightforward and similar for all the published packages in the monorepo.

Steps

  1. Make some meaningful changes to a package in the monorepo.
  2. Bump the version of the package within the monorepo, this is done with the command yarn manage-version in the root of the monorepo and uses lerna to bump the version of the desired package as well as its version in other package.json files if it is a dependency in another package in the monorepo.
  3. Submit a pull request.
  4. Once the PR is merged, the cd.packages-stable.create-release-drafts.yml workflow will run. This file creates a release draft for any packages which have a bumped version compared to the latest published version.

Note that the metadata package will automatically be published to npm at this stage.

  1. Once the release draft is created, it will appear here and you will have to go to the draft, modify the release notes (we usually just copy the text from the CHANGELOG for the package over) and then click publish.
  2. Lastly, the handler.publish-release-packages.yml workflow will run. This file handles the actual publishing of the package to npm.
Clone this wiki locally