https://github.com/templum/gitmoji-changelog
This action generates a CHANGELOG based on the git history using the Gitmoji convention. If no CHANGELOG has been created yet, it will go ahead and create one based on the current version. Currently, only package.json is supported (feel free to request other tooling).
https://github.com/templum/gitmoji-changelog
changelog changelog-generator github-actions gitmoji gitmoji-changelog
Last synced: 3 months ago
JSON representation
This action generates a CHANGELOG based on the git history using the Gitmoji convention. If no CHANGELOG has been created yet, it will go ahead and create one based on the current version. Currently, only package.json is supported (feel free to request other tooling).
- Host: GitHub
- URL: https://github.com/templum/gitmoji-changelog
- Owner: Templum
- License: apache-2.0
- Created: 2024-03-24T12:47:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-19T02:02:00.000Z (about 1 year ago)
- Last Synced: 2025-09-05T11:57:07.151Z (9 months ago)
- Topics: changelog, changelog-generator, github-actions, gitmoji, gitmoji-changelog
- Language: JavaScript
- Homepage:
- Size: 641 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gitmoji-changelog
[](https://github.com/Templum/gitmoji-changelog/actions/workflows/ci.yml)
[](https://github.com/Templum/gitmoji-changelog/actions/workflows/compile.yml)
This action generates a `CHANGELOG` based on the git history using the [Gitmoji](https://gitmoji.dev/about) convention. If no CHANGELOG has been created yet, it will go ahead and create one based on the current version. Currently, only package.json is supported (feel free to request other tooling). If a `CHANGELOG.md` exists, it will append to it based on the commits between the last changelog entry and `HEAD`. This action will provide via outputs the place of the created/updated `CHANGELOG.md` so it can be committed or uploaded. For example, flows have a look at the [usage examples](#example-usage)
> Please be aware that this expects you to create Tags for the versions that may be prefixed with 'v' or 'V'. e.g. Version=1.0.0 => TAG=1.0.0 or TAG=v1.0.0 or TAG=V1.0.0
## Inputs
| Input Name | Required | Default | Description |
| ----------------------- | -------- | ------- | ----------------------------------------------------------- |
| add-authors | false | 'true' | This determines whether the Authors of the Commits should be added to the changelog. It should be a valid YAML boolean value (e.g. TRUE, FALSE, true, false). |
| override-project-path | false | '' | This can be used to provide a relative path to the project root that should be used to collect history. Should not start with ".". |
| override-changelog-path | false | '' | This can be used to provide a relative path to the project root where the CHANGELOG should be stored. It should end on "CHANGELOG.md" and not start with ".". |
## Outputs
| Output | Description |
| -------------- | ----------------------------------------------------------------------------------------- |
| for-version | Will be populated with the version for which the CHANGELOG was generated. |
| changelog-path | The absolute path on the runner where the CHANGELOG.md is located. |
## Example usage
Generate Changelog and leverage peter-evans/create-pull-request@v6 to create a PR.
```yaml
name: Generate Changelog in PR
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # This is required to fetch the whole history and tags, which are essential for the action
- name: Generate Changelog
uses: Templum/gitmoji-changelog@main
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: feature/changelog-update
title: ":memo: Update Changelog for ${{ steps.outputs.for-version }}"
commit-message: ":memo: Update Changelog for ${{ steps.outputs.for-version }}"
```