Automatically update your CHANGELOG.md for a new release
Find a file
renovate[bot] 979750826c
Some checks are pending
Check dist/ / check-dist (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
build-test / build (push) Waiting to run
chore(deps): update dependency @typescript-eslint/parser to v8.40.0 (#559)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-20 04:29:35 +00:00
.githooks fix(hooks): patch shebang 2024-04-24 05:29:43 +05:30
.github chore(deps): update github/codeql-action digest to 96f518a (#558) 2025-08-20 01:01:04 +00:00
.vscode ifeat(nix): set up flake-compat 2023-02-09 11:36:42 +00:00
__tests__ Merge remote-tracking branch 'upstream/master' 2024-07-22 00:21:04 +05:30
dist Merge remote-tracking branch 'upstream/master' 2024-07-22 00:21:04 +05:30
src Merge remote-tracking branch 'upstream/master' 2024-07-22 00:21:04 +05:30
types Add release-notes output (#28) 2024-07-20 12:15:49 +10:00
.envrc chore: refresh Nix setup 2024-07-14 01:11:39 +05:30
.eslintignore Initial commit 2020-02-15 13:26:26 +08:00
.eslintrc.json Initial commit 2020-02-15 13:26:26 +08:00
.gitattributes Add release-notes output (#28) 2024-07-20 12:15:49 +10:00
.gitignore Initial commit 2020-02-15 13:26:26 +08:00
.prettierignore Initial commit 2020-02-15 13:26:26 +08:00
action.yml Add release-notes output (#28) 2024-07-20 12:15:49 +10:00
CHANGELOG.md Merge remote-tracking branch 'upstream/master' 2024-07-22 00:21:04 +05:30
default.nix chore: refresh Nix setup 2024-07-14 01:11:39 +05:30
flake.lock flake.lock: Update 2025-08-17 03:48:48 +00:00
flake.nix chore: remove unused input follows 2024-08-16 00:56:18 +05:30
jest.config.js fix: allow running tests 2023-06-02 17:56:53 +00:00
LICENSE Make LICENSE our own and add link to README 2020-02-22 17:22:28 +11:00
package.json chore(deps): update dependency eslint-plugin-jest to v29 (#531) 2025-07-09 07:51:09 +00:00
README.md Update README.md 2024-02-14 18:37:33 +11:00
shell.nix chore: refresh Nix setup 2024-07-14 01:11:39 +05:30
tsconfig.json fix: allow running tests 2023-06-02 17:56:53 +00:00
webpack.config.js Initial commit 2020-02-15 13:26:26 +08:00
yarn.lock chore(deps): update dependency @typescript-eslint/parser to v8.40.0 (#559) 2025-08-20 04:29:35 +00:00

Keep A Changelog - New Release

This GitHub action will update your CHANGELOG.md for a new release:

  • Changes the 'unreleased' section to the new version
  • Updates the links to the tags at the end of the file
  • Inserts a new 'unreleased' section at the top

Here is a diff from one of the test cases:

diff --git a/./__tests__/fixtures/standard/CHANGELOG.md b/./__tests__/fixtures/standard/CHANGELOG.expected.md
index bc86d0e..08101e3 100644
--- a/./__tests__/fixtures/standard/CHANGELOG.md
+++ b/./__tests__/fixtures/standard/CHANGELOG.expected.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+## [0.3.0] - 2019-12-06
+
 ### Changed
 
 -   Our main theme is now blue instead of red.
@@ -28,7 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 -   Initial release :tada:
 
-[Unreleased]: https://github.com/foo/bar/compare/0.2.0...HEAD
+[Unreleased]: https://github.com/foo/bar/compare/0.3.0...HEAD
+
+[0.3.0]: https://github.com/foo/bar/compare/0.2.0...0.3.0
 
 [0.2.0]: https://github.com/foo/bar/compare/0.1.0...0.2.0
 

Usage

Within a workflow, you can use it like this:

name: "..."
on: ...

jobs:
  update-changelog:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    
    - name: Update changelog
      uses: thomaseizinger/keep-a-changelog-new-release@v2
      with:
        tag: v0.6.0 # You probably want to have this dynamic :)

The action will do nothing else apart from modifying the changelog. It neither creates a commit, nor does it push anything to anywhere. You will have to do that as part of your workflow if you need this behaviour.

Checkout this blogpost or this repository for a set of workflows of an automated release using GitFlow and Github actions.