mirror of
https://github.com/msfjarvis/keep-a-changelog-new-release
synced 2026-03-19 03:38:15 +05:30
Automatically update your CHANGELOG.md for a new release
- TypeScript 82.2%
- Nix 8.7%
- JavaScript 5.1%
- Shell 4%
Flake lock file updates:
• Updated input 'nixpkgs':
'github:msfjarvis/nixpkgs/6200d97fd8127bf9a8c6502fd313ef71c4d9110b?narHash=sha256-9WIIIpabyXkDYDK%2BYFy3UK3CyQLiVXZ%2BuO07YaNzF4Y%3D' (2026-03-07)
→ 'github:msfjarvis/nixpkgs/2f718d4e2caeba0f6bec625eb909e163495688ab?narHash=sha256-T7R1kPyXo9%2BKbrqpWn8wGP6hqEj1m%2B%2BT8drsM2/K4LA%3D' (2026-03-15)
|
||
|---|---|---|
| .githooks | ||
| .github | ||
| .vscode | ||
| __tests__ | ||
| dist | ||
| src | ||
| types | ||
| .envrc | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| .prettierignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| jest.config.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| shell.nix | ||
| tsconfig.json | ||
| webpack.config.js | ||
| yarn.lock | ||
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.