This action helps you easily auto-update your changelog!
But it can feel overwhelming and require additional work to update things like versions and changelogs.
Built around the KeepAChangelog format, this action looks for an entry line for an updated package and either:
- Add it if not found (including adding the
### Dependencies
and## [<version>]
sections!) - Update it if the package has been upgraded after an initial entry was written
name: 'pull-request'
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
- unlabeled
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Depending on your needs, you can use a token that will re-trigger workflows
# See https://github.com/stefanzweifel/git-auto-commit-action#commits-of-this-action-do-not-trigger-new-workflow-runs
token: ${{ secrets.GITHUB_TOKEN }}
- uses: dangoslen/dependabot-changelog-helper@v2
with:
version: ${{ needs.setup.outputs.version }}
activationLabel: 'dependabot'
changelogPath: './CHANGELOG.md'
Below are the properties you can use for the Dependabot Changelog Helper.
Default | Description |
---|---|
UNRELEASED |
The version to find in the changelog to add Dependabot entries to. |
If the version
is not found then an unreleased version - matching the pattern /^## [(unreleased|Unreleased|UNRELEASED)]
- is used.
Many changelogs default to keeping an released version at the top of the changelog. This is a way to incrementally build a version over time and only release a version once the right changes have been accounted for.
Warning For the action to work you must have either set a
version
or have an unreleased version in your changelog.
Default | Description |
---|---|
./CHANGELOG.md |
The path to the changelog file to add Dependabot entries to. |
Default | Description |
---|---|
dependabot |
The label to indicate that the action should run. |