1 Writing Changelogs to the Repository
maxpeterkaya edited this page 2026-09-16 10:11:07 -04:00

Writing Changelogs to the Repository

By default the changelog is only attached to the release. Enable either of these inputs to also commit it into the repository:

Input Writes to Use when
write_to_file CHANGELOG.md in the repository root, replaced each run You want a single cumulative changelog file.
write_per_tag changelogs/<tag>.md, one file per release You want a directory of per-release files.

Both can be enabled at the same time.

- uses: https://vc.maxkaya.com/maxpeterkaya/changelog@latest
  with:
    server_url: https://vc.maxkaya.com
    repository: ${{ github.repository }}
    token: ${{ secrets.PAT }}
    write_to_file: "true"
    write_per_tag: "true"

File naming

For write_per_tag, the tag name becomes the file name. Any / in the tag is replaced with _, so tag release/1.2.0 writes changelogs/release_1.2.0.md.

How the commit is made

When there is something to write, the action:

  1. Writes the file(s).
  2. Stages them with git add.
  3. Commits with the message chore: update changelog for <tag>, authored as changelog-bot <changelog@noreply.panteraware.com>.
  4. Pushes to the target branch.

The target branch is chosen in this order:

  1. The branch input, when set.
  2. GITHUB_REF_NAME (the ref that triggered the workflow).
  3. The current checked-out branch.

If the write produces no changes (the file already has the same content), no commit is made.

Requirements

  • The token must have write access to the repository contents, because the changelog is pushed over HTTPS using the same token.
  • The workflow must check out the repository if you want the commit to be based on the current tree.

Home · Installation · Inputs Reference · Outputs and Commit Groups · Tag Ranges and Rollup · Styles and LLM Providers · Troubleshooting