Interview Prep/GitHub Actions/Debugging, Cost, Monorepos & Releases

How do you automate releases with release-please?

IntermediateConceptDebugging, Cost, Monorepos & Releases
Answer

release-please reads Conventional Commits on main, maintains a release PR that bumps versions and updates CHANGELOG.md, and when that PR is merged, creates the tag and GitHub Release.

on:
  push:
    branches: [main]
permissions:
  contents: write
  pull-requests: write
jobs:
  release:
    runs-on: ubuntu-24.04
    steps:
      - id: rp
        uses: googleapis/release-please-action@v4
        with:
          release-type: node
          token: ${{ steps.app.outputs.token }}   # App token so the tag triggers workflows

Downstream jobs use if: steps.rp.outputs.release_created and steps.rp.outputs.tag_name. semantic-release is the fully automatic alternative without a release PR.

All GitHub Actions questions Roadmap: GitHub Actions

More on Debugging, Cost, Monorepos & Releases