Drafts your next release notes as pull requests are merged into master.
Drafts your next release notes as pull requests are merged into master.
Draft the next release notes as pull requests merge into a branch.
Add the
Release Drafter GitHub Action
to a
GitHub Actions workflow.
For example, create .github/workflows/release-drafter.yml with this content:
name: Release Drafter
on:
push:
branches:
- main
# Permissions for the default token.
permissions:
contents: write
pull-requests: read
jobs:
update_release_draft:
runs-on: ubuntu-slim
steps:
- uses: release-drafter/release-drafter@v7
with:
# This default loads .github/release-drafter.yml.
config-name: release-drafter.ymlRelease Drafter provides a CLI for local use and automation. The CLI requires Node.js 24 or later.
npx release-drafter owner/repo --dry-runFor GitHub.com or GitHub Enterprise Cloud on *.ghe.com, authenticate with
GH_TOKEN or GITHUB_TOKEN. For GitHub Enterprise Server, use
GH_ENTERPRISE_TOKEN or GITHUB_ENTERPRISE_TOKEN.
Release Drafter does not invoke gh. To use GitHub
CLI credentials, pass them through GH_TOKEN:
GH_TOKEN="$(gh auth token)" npx release-drafter owner/repo --dry-runThe CLI can validate one pull request with the same category rules as the Check PR action:
npx release-drafter check-pr owner/repo 123See the release-drafter package README
for installation instructions, the complete option reference, configuration
targets, JSON output, and exit codes.
The read-only Check PR action validates a pull request against the title or
label conditions in Release Drafter categories. See
check-pr/README.md for the workflow, permissions,
supported events, and matching behavior.
The action requires a configuration file. By default, it loads
.github/release-drafter.yml through the GitHub API. You do not need to check
out the repository.
[!note] See Configuration loading to load a generated file, extend another configuration, or load from another repository.
Create .github/release-drafter.yml with this content:
template: |
## What's Changed
$CHANGESWhen a pull request merges, Release Drafter adds the change to a draft release:
This example groups changes and calculates the next version number:
…The .github/release-drafter.yml file supports these keys:
| Key | Required | Description |
|---|---|---|
template |
Required | The template for the body of the draft release. Use template variables to insert values. |
header |
Optional | Adds text before template. Use template variables to insert values. |
footer |
Optional | Adds text after template. Use template variables to insert values. |
category-template |
Optional | The template to use for each category. Use category template variables to insert values. Default: "## $TITLE". |
name-template |
Optional | The template for the name of the draft release. For example: "v$NEXT_PATCH_VERSION". |
tag-template |
Optional | The template for the tag of the draft release. For example: "v$NEXT_PATCH_VERSION". |
tag-prefix |
Optional | A prefix for release tag filtering. Release Drafter removes the prefix before it parses a matching version. Default: "". |
version-template |
Optional | The template for the next version number. Use it for projects that do not use Semantic Versioning. Default: "$MAJOR.$MINOR.$PATCH$PRERELEASE". |
change-template |
Optional | The template to use for each merged pull request. Use change template variables to insert values. Default: "* $TITLE (#$NUMBER) $AUTHORS". |
change-author-template |
Optional | The template to use for each author in $AUTHORS. Supports $AUTHOR for the raw login/name and $AUTHOR_MENTION for a GitHub-formatted mention. Default: "$AUTHOR_MENTION". |
change-authors-separator |
Optional | The separator between authors in $AUTHORS. Default: ", ". Use "\n" with a list-style change-author-template for multiline output. |
change-authors-final-separator |
Optional | The separator before the final author in $AUTHORS. For example, " and " produces @octocat, @cchanche and @jetersen. Default: the value of change-authors-separator. |
change-title-escapes |
Optional | Characters to escape in $TITLE when inserting into change-template so that they are not interpreted as Markdown format characters. Default: "" |
no-changes-template |
Optional | The template to use when there are no changes. Default: "* No changes". |
categories |
Optional | Defines how Release Drafter filters and groups changes and selects version increments. Categories support type, when, exclusive, collapse-after, and semver-increment. See Categorize changes. |
exclude-contributors |
Optional | Excludes specified usernames from $CONTRIBUTORS. See Exclude contributors. |
new-contributor-template |
Optional | The template to use for each new contributor in $NEW_CONTRIBUTORS. Use new contributor template variables to insert values. Default: "* $AUTHOR_MENTION made their first contribution in #$NUMBER". |
no-new-contributor-template |
Optional | The template to use for $NEW_CONTRIBUTORS when there are no new contributors to list. Default: "* No new contributors". |
no-contributors-template |
Optional | The template to use when $CONTRIBUTORS has no entries. Default: "No contributors". |
replacers |
Optional | Searches and replaces content in the generated changelog body. See Replacers. |
sort-by |
Optional | Sorts the changelog by merged_at or title. Default: merged_at. |
No open issues yet, or sync has not completed.