https://github.com/enterwell/changelogmanager-github-action
https://github.com/enterwell/changelogmanager-github-action
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/enterwell/changelogmanager-github-action
- Owner: Enterwell
- License: mit
- Created: 2023-04-07T11:12:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T11:16:51.000Z (3 months ago)
- Last Synced: 2025-03-15T12:23:29.031Z (3 months ago)
- Language: TypeScript
- Size: 71 MB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Changelog Manager GitHub Action
Compiles the change files into CHANGELOG.md
[](https://github.com/Enterwell/ChangelogManager-GitHub-Action/actions/workflows/CI.yml)
[](https://github.com/Enterwell/ChangelogManager-GitHub-Action/actions/workflows/codeql-analysis.yml)
[](https://github.com/Enterwell/ChangelogManager-GitHub-Action/issues)
## 🌱 Introduction
This is the *GitHub Action* version of an [Azure DevOps task](https://github.com/Enterwell/ChangelogManager/tree/main/Enterwell.CI.Changelog.DevOpsExtension) developed for the convenience of managing a [changelog](https://keepachangelog.com/en/1.1.0/), indirectly, using special *change* files.#### What are the *change* files?
*Change* files are just files located in the ***changes*** directory with the following naming scheme:
```
[]
```Acceptable entries for the `` are:
+ Added
+ Changed
+ Deprecated
+ Removed
+ Fixed
+ SecurityThis decision was inspired by following the [principles](https://keepachangelog.com/en/1.0.0/#how) for keeping a good changelog.
To avoid incorrect file naming and to ease this file creation process on the developer, [Visual Studio extension](https://github.com/Enterwell/ChangelogManager/tree/main/Enterwell.CI.Changelog.VSIX) and the [CLI helper](https://github.com/Enterwell/ChangelogManager/tree/main/Enterwell.CI.Changelog.CLI) were made.
This *Action* internally calls our [Changelog Manager tool](https://github.com/Enterwell/ChangelogManager/tree/main/Enterwell.CI.Changelog) 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.## 📖 Table of contents
+ 🌱 [Introduction](#-introduction)
+ 🛠️ [Prerequisities](#-prerequisities)
+ 📝 [Usage](#-usage)
+ 📥 [Inputs](#-inputs)
+ 📤 [Outputs](#-outputs)
+ 🏗 [Development](#-development)
+ ☎️ [Support](#-support)
+ 🪪 [License](#-license)## 🛠 Prerequisities
The following prerequisities need to be fulfilled in order for the action to work properly:
#### Changes directory
Automation agent where the action executes needs to have a ***changes*** directory containing the [*change*](#what-are-the-change-files) files created manually or with one of our helpers. If the directory does not exist, action will throw an error.
#### Changelog file
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]
```## 📝 Usage
### Basic
```yaml
uses: Enterwell/ChangelogManager-GitHub-Action@v3
```### Advanced
```yaml
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]
```## 📥 Inputs
### `changelog-location`
**Optional** Location of the directory containing the `CHANGELOG.md` file.
+ Defaults to `./`### `changes-in-different-location`
**Optional** Boolean representing that the *changes* directory exists in a different location than the `CHANGELOG.md` file.
+ Defaults to `false`### `changes-location`
**Optional** Location of the `changes` directory.
+ If the previous input is set to `false`, changes location is set to `\changes`.### `should-bump-version`
**Optional** Boolean representing should the new version be set in the appropriate project file (`package.json` or `*.csproj`).
+ Defaults to `false`### `path-to-project-file`
**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**## 📤 Outputs
### `bumped-semantic-version`
Newly bumped semantic version based on the changes made.### `bumped-major-part`
Major part of the newly bumped version### `bumped-minor-part`
Minor part of the newly bumped version### `bumped-patch-part`
Patch part of the newly bumped version### `new-changes`
Changes from the new changelog section### Usage
```yaml
# github-workflow.yml
...
steps:
...
- uses: Enterwell/ChangelogManager-GitHub-Action@v3
id: merge-changelog- run: echo ${{ steps.merge-changelog.outputs.bumped-semantic-version }}
...
...
```## 🏗 Development
This action uses [pnpm](https://pnpm.io/) 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](https://nodejs.org/en) installed)
```bash
npm install --global pnpm
```Now you can install dependencies using the following command
```bash
pnpm install
```### Available commands
| 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 |## ☎ Support
If you are having problems, please let us know by [raising a new issue](https://github.com/Enterwell/ChangelogManager-GitHub-Action/issues/new).
## 🪪 License
This project is licensed with the [MIT License](LICENSE).