Skip to main content

Releasing

Guide to the release process using Changesets.

Overview

Serverless Monolith uses Changesets for versioning and publishing.

For Contributors

1. Make Your Changes

Make your code changes as usual.

2. Create a Changeset

Before committing, create a changeset:

pnpm changeset

You'll be prompted to:

  1. Select affected packages
  2. Choose version bump type (patch/minor/major)
  3. Write a summary

3. Commit Everything

git add .changeset/
git add .
git commit -m "feat: your feature description"

4. Open Pull Request

Push and open a PR. The CI will verify your changeset.

For Maintainers

Release Process

  1. Merge PRs with changesets to main

  2. Version Packages

    The CI automatically creates a "Version Packages" PR when changesets are detected.

  3. Review Version PR

    Check the updated:

    • package.json versions
    • CHANGELOG.md files
    • Changeset consumption
  4. Merge Version PR

    Once merged, the CI automatically:

    • Publishes packages to npm
    • Creates GitHub release
    • Tags the release

Manual Release

If needed, release manually:

# Apply version changes
pnpm changeset:version

# Commit changes
git add .
git commit -m "chore: version packages"

# Build and publish
pnpm release

Versioning Strategy

Semantic Versioning

TypeVersionDescription
Patch1.0.0 → 1.0.1Bug fixes, no API changes
Minor1.0.0 → 1.1.0New features, backward compatible
Major1.0.0 → 2.0.0Breaking changes

When to Bump

Patch:

  • Bug fixes
  • Documentation updates
  • Internal refactoring

Minor:

  • New features
  • New APIs (non-breaking)
  • Performance improvements

Major:

  • Breaking API changes
  • Removed features
  • Major architecture changes

Changeset Examples

Patch

---
"@serverless-monolith/core": patch
---

Fixed issue with module discovery in nested directories.

Minor

---
"@serverless-monolith/core": minor
---

Added support for custom log storage adapters.

Major

---
"@serverless-monolith/core": major
---

Changed configuration format. See migration guide for details.

Multiple Packages

---
"@serverless-monolith/core": minor
"@serverless-monolith/proxy": patch
---

Added new routing options to core and updated proxy to support them.

Release Channels

Stable (npm latest)

Default release channel for production use.

Prerelease (Future)

For testing upcoming changes:

pnpm changeset pre enter next
pnpm changeset version
pnpm release

Troubleshooting

Forgot Changeset

If you forgot to create a changeset:

pnpm changeset
git add .changeset/
git commit --amend

Wrong Version Type

Create a new changeset with the correct type. Changesets are additive.

Release Failed

Check CI logs and npm status. Retry with:

pnpm changeset:publish

Changelog

Changelogs are automatically generated from changesets:

# @serverless-monolith/core

## 1.1.0

### Minor Changes

- Added support for custom log storage adapters.

### Patch Changes

- Fixed issue with module discovery.