Draft your next release notes as pull requests are merged into master with Release Drafter

Now this looks handy: a GitHub action that builds release notes for you:

As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready

You configure the release notes contents using a .github/release-drafter.yml file in your repo:

template: |
  ## What’s Changed


More advanced templates are also possible:

name-template: 'v$NEXT_PATCH_VERSION 🌈'
tag-template: 'v$NEXT_PATCH_VERSION'
  - title: '🚀 Features'
      - 'feature'
      - 'enhancement'
  - title: '🐛 Bug Fixes'
      - 'fix'
      - 'bugfix'
      - 'bug'
  - title: '🧰 Maintenance'
    label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
  ## Changes


The template above yields this kind of result:


Release Drafter →

Automatic GitHub Changelog Generator

If your code/project always uses Pull Requests to add/fix stuff in your code (e.g. no direct commits on master), then Changelog Generator will come in handy. It’s a CLI tool (written in PHP) that automatically fetches all closed PRs and Issues between the targetted and the previously tagged release.

Installation is possible using Composer:

$ composer require jwage/changelog-generator

Once installed, run it like so:

$ changelog-generator generate --user=jwage --repository=changelog-generator --milestone=0.0.7

The snippet above will check all closed PRs and Issues that landed in between the 0.0.7 release and the one before (e.g. 0.0.6) of the repo jwage/changelog-generator.


- Total issues resolved: **1**
- Total pull requests resolved: **4**
- Total contributors: **3**


 - [47: Upgrade Doctrine Coding Standards to 5.0](https://github.com/jwage/changelog-generator/pull/47) thanks to @jwage
 - [43: Generate alternative (Setext, without #) Markdown format for headers](https://github.com/jwage/changelog-generator/pull/43) thanks to @Majkl578
 - [38: Fix: Provide missing required php version in composer](https://github.com/jwage/changelog-generator/pull/38) thanks to @prisis
 - [32: Upgrade PHPStan to 0.10](https://github.com/jwage/changelog-generator/pull/32) thanks to @jwage

Adding the --prepend --file=CHANGELOG.md options, will automatically prepend its output to CHANGELOG.md.

💡 In case you don’t always want to type the arguments you could define it as a custom composer command/script into your own project, or use a config file which is also supported.

Generate a Markdown Changelog from a GitHub milestone. →