This is the GitHub Action version of an Azure DevOps task developed for the convenience of managing a changelog, indirectly, using special change files.
Change files are just files located in the changes directory with the following naming scheme:
<change_type> [<change_category>] <change_description>
Acceptable entries for the <change_type>
are:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security
This decision was inspired by following the principles for keeping a good changelog.
To avoid incorrect file naming and to ease this file creation process on the developer, Visual Studio extension and the CLI helper were made.
This Action internally calls our Changelog Manager tool by forwarding action inputs to it, which then inserts the appropriate section to the CHANGELOG.md
and deletes all the contents of the changes directory.
We highly recommend that you read up on how and what exactly is it doing behind the scenes, as well as, learn how to use the .changelog.json
configuration file to customize the tool's behaviour.
- π± Introduction
- π οΈ Prerequisities
- π Usage
- π₯ Inputs
- π€ Outputs
- π Development
- βοΈ Support
- πͺͺ License
The following prerequisities need to be fulfilled in order for the action to work properly:
Automation agent where the action executes needs to have a changes directory containing the change files created manually or with one of our helpers. If the directory does not exist, action will throw an error.
The action also needs to be able to find CHANGELOG.md
file (naming is case-insensitive), otherwise, it will throw and stop executing.
Important note. As it currently stands, the action is inserting the newly compiled section above the latest changelog entry. So, the CHANGELOG.md
needs to contain atleast
_NOTE: This is an automatically generated file. Do not modify contents of this file manually._
## [Unreleased]
uses: Enterwell/ChangelogManager-GitHub-Action@v3
uses: Enterwell/ChangelogManager-GitHub-Action@v3
with:
changelog-location: ./
changes-in-different-location: true
changes-location: ./somewhere-else/changes
should-bump-version: true
path-to-project-file: ./somewhere-else/[package.json | something.csproj]
Optional Location of the directory containing the CHANGELOG.md
file.
- Defaults to
./
Optional Boolean representing that the changes directory exists in a different location than the CHANGELOG.md
file.
- Defaults to
false
Optional Location of the changes
directory.
- If the previous input is set to
false
, changes location is set to<location containing the CHANGELOG.md>\changes
.
Optional Boolean representing should the new version be set in the appropriate project file (package.json
or *.csproj
).
- Defaults to
false
Optional Path to the project file (package.json
or .csproj
with the version
(case-insensitive) tag).
- If the previous input is set to
true
, but this input is not passed in explicitly, the action will try to automatically determine the appropriate project file - If the previous input is set to
false
, this input is ignored
Newly bumped semantic version based on the changes made.
Major part of the newly bumped version
Minor part of the newly bumped version
Patch part of the newly bumped version
Changes from the new changelog section
# github-workflow.yml
...
steps:
...
- uses: Enterwell/ChangelogManager-GitHub-Action@v3
id: merge-changelog
- run: echo ${{ steps.merge-changelog.outputs.bumped-semantic-version }}
...
...
This action uses pnpm as its package manager, so in order to get quickly up and developing you will need to have it installed on your machine.
If you don't already have it, you can easily install it by using the following command (assuming you have Node.js installed)
npm install --global pnpm
Now you can install dependencies using the following command
pnpm install
Command | Description |
---|---|
pnpm build |
Compile the TypeScript source code into JavaScript |
pnpm lint |
Lint the source code |
pnpm test |
Test the action |
pnpm package |
Packages the action source code and its dependencies into dist folder |
If you are having problems, please let us know by raising a new issue.
This project is licensed with the MIT License.