Skip to content

bitxeno/changelogithub-action

Repository files navigation

changelogithub-action

release build status license

A GitHub action to generate changelog with Conventional Commits. Powered by changelogithub

Usage

- uses: bitxeno/changelogithub-action@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    output-file: ./docs/CHANGELOG.md
    types: |
      feat
      fix
      perf
      refactor
      tweak

Inputs

The following inputs are available:

Name Description Required
token The GitHub Token to use.
capitalize Capitalize commit messages.
contributors Whether to include contributors in release notes.
emoji Use emojis in section titles.
from The start commit reference. When not provided, the latest git tag is used.
group Nest commit messages under their scopes.
to The end commit reference. When not provided, the latest commit in HEAD is used.
types generate log types filter. (based on the angular)
output-file File to output the changelog to.

The following types are available:

Name Description Optional
feat A new feature
fix A bug fix
perf A code change that improves performance
refactor A code change that neither fixes a bug nor adds a feature
test Adding missing tests or correcting existing tests
build Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
docs Documentation only changes
tweak A code change that neither fixes a bug nor adds a feature. (discuss)
improve A code change that neither fixes a bug nor adds a feature. (discuss)
style Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)

Outputs

The following outputs are available:

Name Description
changelog The generated changelog for the new version.
changelog_with_version The generated changelog for the new version with version header. (Better for CHANGELOG.md file).

Code in Main

First, you'll need to have a reasonably modern version of node handy. This won't work with versions older than 9, for instance.

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package