DEV Community

loading...

Keep a Changelog Up To Date

Dan Goslen
Software engineer. Code review advocate. Coffee consumer. Outdoor enthusiast. I write about how to build software as part of a team
・1 min read

My Workflow

My team recently was running into a problem generating reliable release notes for our software. We decided we wanted to automate it from a CHANGELOG.md file. However, that meant we needed to always keep that file up to date with changes.

So I made a GitHub action that enforces that changes had been made to the file 😀

Submission Category:

Maintainer Must-Haves

Yaml File or Link to Code

The repository can be found here

GitHub logo dangoslen / changelog-enforcer

A simple GitHub action that enforces that a maintained changelog is kept up to date.

unit tests badge latest version

Changelog Enforcer

The purpose of this action is to enforce a change to a ongoing changelog file. Inspired by Keep A Changelog, this action helps development teams to keep a change file up to date as new features or fixes are implemented.

Usage

To use, follow the typical GitHub Action uses syntax.

Requires the common Checkout Action as shown below! The enforcement of change is done all using local git commands and requires the repository be checked out!

name: "Pull Request Workflow"
on
  pull_request
      types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
  # Enforces the update of a changelog file on every pull request 
  changelog:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: dangoslen/changelog-enforcer@v1.1.1
      with:
        changeLogPath: 'CHANGELOG.md'
        skipLabel: 'Skip-Changelog'

Inputs / Properties

There are two properties with sane defaults provided

Additional Resources / Info

You can use this action in conjunction with the Changelog Reader Action to keep an updated CHANGELOG.md file and automatically generate release notes with your GitHub releases!

An example workflow is found in the Changelog Enforcer Workflows which creates a new version on every push to master.

Hope you enjoy it!

Discussion (0)

Forem Open with the Forem app