Drafts your next release notes as pull requests are merged into master.
You can use the
Release Drafter GitHub Action
in a
GitHub Actions Workflow
by configuring a YAML-based workflow file, e.g.
.github/workflows/release-drafter.yml, with the following:
name: Release Drafter
on:
push:
branches:
- main
- master
# Permissions for default token (secrets.GITHUB_TOKEN)
permissions:
contents: write
pull-requests: read
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v7
with:
config-name: release-drafter.yml # the default, loads '.github/release-drafter.yml'
The action requires a configuration file. Default location is
.github/release-drafter.yml, and will be fetched using octokit behind the
scenes. You do not need to checkout your repository beforehand.
[!note]
For advanced scenarios, please read dedicated Configuration Loading article. (ex: dynamic config, extending other files, fetch from another repo, etc...)
For example, take the following .github/release-drafter.yml file in a
repository:
template: |
## What’s Changed
$CHANGES
As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready:

The following is a more complicated configuration, which categorises the changes into headings, and automatically suggests the next version number:
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
semver-increment: minor
when:
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
when:
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
when:
label: "chore"
- type: "pre-exclude"
when:
label: "skip-changelog"
- type: "version-resolver"
semver-increment: "major"
when:
label: "major"
- type: "version-resolver"
semver-increment: "patch"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
template: |
## Changes
$CHANGES
You can configure Release Drafter using the following key in your
.github/release-drafter.yml file:
| Key | Required | Description |
|---|---|---|
template |
Required | The template for the body of the draft release. Use template variables to insert values. |
header |
Optional | Will be prepended to template. Use template variables to insert values. |
footer |
Optional | Will be appended to 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 known prefix used to filter release tags. For matching tags, this prefix is stripped before attempting to parse the version. Default: "" |
version-template |
Optional | The template to use when calculating the next version number for the release. Useful for projects that don't 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) @$AUTHOR". |
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 for when there’s no changes. Default: "* No changes". |
references |
Optional | The references to listen for configuration updates to .github/release-drafter.yml. Refer to References to learn more about this |
categories |
Optional | Define how changes are filtered, grouped, and versioned. Categories support type, when, exclusive, collapse-after, and semver-increment. Refer to Categorize Changes. |
exclude-contributors |
Optional | Exclude specific usernames from the generated $CONTRIBUTORS variable. Refer to Exclude Contributors to learn more about this option. |
no-contributors-template |
Optional | The template to use for $CONTRIBUTORS when there's no contributors to list. Default: "No contributors". |
replacers |
Optional | Search and replace content in the generated changelog body. Refer to Replacers to learn more about this option. |
sort-by |
Optional | Sort changelog by merged_at or title. Can be one of: merged_at, title. Default: merged_at. |
sort-direction |
Optional | Sort changelog in ascending or descending order. Can be one of: ascending, descending. Default: descending. |
prerelease |
Optional | Whether to draft a prerelease, with changes since another prerelease (if applicable). Default false. |
prerelease-identifier |
Optional | A string indicating an identifier (alpha, beta, rc, etc), to increment the prerelease version. This automatically enables prerelease when both options come from the same config location; explicit action inputs still take precedence. Default ''. |
include-pre-releases |
Optional | When looking for the last published release to scan changes up-to, include pre-releases. Has no effect if using prerelease: true (already enabled). Default false. |
latest |
Optional | Mark the release as latest. Only works for published releases. Can be one of: true, false, legacy. Default true. |
commitish |
Optional | The release target, i.e. branch or commit it should point to. Default: the ref that release-drafter runs for, e.g. refs/heads/master if configured to run on pushes to master. |
filter-by-range |
Optional | Filter releases that satisfies a semver range. Evaluates the tag name againts node's semver.satisfies(). Default : "*". |
filter-by-commitish |
Optional | Filter previous releases to consider only those with the target matching commitish. Default: false. |
pull-request-limit |
Optional | Limit for associatedPullRequests API call. Use this when working with long-lived non-default branches. See #1354. Default: 5 |
history-limit |
Optional | Size of the pagination window when walking the repo. Can avoid erratic 502s from Github. Default: 15 |
You can use any of the following variables in your template, header and
footer:
| Variable | Description |
|---|---|
$CHANGES |
The markdown list of pull requests that have been merged. |
$CONTRIBUTORS |
A comma separated list of contributors to this release (pull request authors, commit authors, and commit committers). |
$PREVIOUS_TAG |
The previous releases’s tag. |
$REPOSITORY |
Current Repository |
$OWNER |
Current Repository Owner |
You can use any of the following variables in category-template:
| Variable | Description |
|---|---|
$TITLE |
The category title, e.g. Features. |
You can use any of the following variables in your template, header,
footer, name-template and tag-template:
| Variable | Description |
|---|---|
$NEXT_PATCH_VERSION |
The next patch version number. For example, if the last tag or release was v1.2.3, the value would be v1.2.4. This is the most commonly used value. |
$NEXT_MINOR_VERSION |
The next minor version number. For example, if the last tag or release was v1.2.3, the value would be v1.3.0. |
$ claude mcp add release-drafter \
-- python -m otcore.mcp_server <graph>