Automatically update your CHANGELOG.md for a new release
Go to file
Thomas Eizinger a0dc0f10c8 Make LICENSE our own and add link to README 2020-02-22 17:22:28 +11:00
.githooks Add commit hook for building javascript 2020-02-17 21:45:09 +11:00
__tests__ Make sure genesishash is valid hex 2020-02-15 21:22:48 +08:00
dist Correctly parse genesis hash from output 2020-02-15 17:40:38 +08:00
src Correctly parse genesis hash from output 2020-02-15 17:40:38 +08:00
types Allow date to be configured 2020-02-15 15:52:44 +08:00
.eslintignore Initial commit 2020-02-15 13:26:26 +08:00
.eslintrc.json Initial commit 2020-02-15 13:26:26 +08:00
.gitignore Initial commit 2020-02-15 13:26:26 +08:00
.prettierignore Initial commit 2020-02-15 13:26:26 +08:00
CHANGELOG.md Add commit hook for building javascript 2020-02-17 21:45:09 +11:00
LICENSE Make LICENSE our own and add link to README 2020-02-22 17:22:28 +11:00
README.md Make LICENSE our own and add link to README 2020-02-22 17:22:28 +11:00
action.yml Add branding to action 2020-02-15 15:52:47 +08:00
jest.config.js Initial commit 2020-02-15 13:26:26 +08:00
package.json Allow action to be used for the first release 2020-02-15 17:29:25 +08:00
tsconfig.json Initial commit 2020-02-15 13:26:26 +08:00
webpack.config.js Initial commit 2020-02-15 13:26:26 +08:00
yarn.lock Allow action to be used for the first release 2020-02-15 17:29:25 +08:00

README.md

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@v1
      with:
        version: 0.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.