How to draft and publish a new release

For maintainers only.

This document explains what are the necessary steps to draft a new release and publish it on NPM and GitHub.


Middy is managed as a monorepo (currently using Lerna). This means that Middy core package and all the official middlewares are developed using the same repository.

By design, new releases keeps all the package versions in sync. For instance, if we are to release v1.2.3, this means that EVERY package needs to be bumped to v1.2.3 and that EVERY package will be published.

This particular design has few important implications:

Draft a new release

At a given point in time, if you want to draft a new release, you need to follow a specific sequence of actions, as described in the following sections:

0. Pick a version number

1. Changelog

2. Version bump

3. Publish release on GitHub

4. Publish release on NPM

This step will happen automatically from GitHub actions after a new release has been drafted. Make sure to double check the action and see if it completed successfully.