Skip to content

Automated releases #1114

@matejchalk

Description

@matejchalk

Motivation

Our current release process is for a core maintainer to run npx nx release --yes in main branch (requires npm login and GITHUB_TOKEN in .env).

We've previously spent quite a lot of effort in releasing via GitHub Actions, but never quite got it working reliably. A partially broken release is complex to recover from, so running a command locally proved to be more practical.

But our current release process relies too much on one person, and doesn't allow us to secure npm publishing via provenance or trusted publishing.

Acceptance criteria

  • run nx release on push to main branch
    • release is skipped if no user-facing commits (feat, fix, perf) were pushed
  • GitHub Actions is configured as a trusted publisher
    • no long-lived npm token is used
    • Node needs to be updated to 24.5 or higher (npm CLI version 11.5.1 or higher)
  • nx release runs all steps as when we run it manually, i.e.:
    • skip if there's nothing to release
    • generate next version tag from commit history
    • update changelog
    • push tagged release commit
    • build all publishable packages
    • publish packages to npm
    • create GitHub release with description from changelog

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions