Skip to content
Latchkey

How to Draft Release Notes From Merged PRs

release-drafter accumulates merged PRs into a draft release, categorized by label, and updates it on each merge to main.

Run release-drafter/release-drafter@v6 on pushes to the default branch. It reads .github/release-drafter.yml for categories and version rules and maintains a single draft release you publish when ready.

Steps

  • Add .github/release-drafter.yml with categories and a template.
  • Run release-drafter/release-drafter@v6 on push to main.
  • Grant contents: write and pull-requests: read.

Workflow

.github/workflows/ci.yml
on:
  push:
    branches: [main]
permissions:
  contents: write
  pull-requests: read
jobs:
  draft:
    runs-on: ubuntu-latest
    steps:
      - uses: release-drafter/release-drafter@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-drafter config

.github/release-drafter.yml
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
  - title: 'Features'
    labels: ['feature', 'enhancement']
  - title: 'Bug Fixes'
    labels: ['fix', 'bug']
version-resolver:
  minor:
    labels: ['feature']
  default: patch
template: |
  ## Changes
  $CHANGES

Gotchas

  • Version resolution depends on PR labels; unlabeled PRs fall to the default bump.
  • The draft is not published automatically; add publish: true only for tag-triggered runs.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →