v0.3.2

Documentation version

v0.2.4v0.3.2
en

Documentation language

en

Search documentation

ESC

Documentation search

What are you working on?

Find a guide, configuration option, action, or ESH topic.

Browse documentation
DocsChangelog action

Changelog action

evin/changelog@v1 reads the complete decorated Git history from newest to oldest, starts a release block at each discovered tag, parses recognized commit subjects, groups them into named sections, and rewrites a Markdown file.

mermaid
mermaid

git log: hash, refs, subject

split at tags

Git commit and release rules

parse subjects

group and sort headings

rewrite changelog

path, version, tag

By default the action generates release notes from commit subjects; it does not preserve hand-written release blocks, query a hosting provider, or generate compare links and release dates. Alternatively, section exports a version body from an existing changelog without regenerating it.

Configuration

Unknown fields are rejected.

with fieldTypeDefaultImplemented contract
pathstringCHANGELOG.mdNon-empty output path. Relative paths use the task cwd and must remain inside the workspace.
include_unreleasedbooleantrueInclude commits newer than the first tagged commit as a pending block.
preamblestringSee belowMarkdown copied verbatim before generated blocks.
show_hashesbooleantrueAppend the abbreviated Git hash from %h in parentheses.
show_scopesbooleantruePrefix scoped changes with **scope:**.
unreleased_headingstringUnreleasedNon-empty pending-block heading when version is absent.
sectionsstring map{}Per-commit-type heading overrides; a case-insensitive value of none omits that type. Keys must be non-empty.
versionstringnoneOptional pipeline template used to rename the pending block. Required by validation when include_unreleased: false.
notes_pathstringnoneOptional non-empty output path for only the pending block's body, without the changelog preamble or heading. Written with the same containment rules as path; parent directories are created.
sectionstringnoneExport this existing version section from path to the required notes_path, without reading Git history or rewriting the changelog. Missing, empty, and duplicate sections fail.
labelstringnoneOptional template appended after the generated pending heading (renamed by version, when set) as — <label>. It does not alter the version or tag.

The exact default preamble is:

# Changelog
All notable changes to this project will be documented in this file.

All strings pass through the task template context during runtime loading. In generation mode, notes_path is written only when the pending block exists. In section export mode, the action reads path and writes the matching body to notes_path, excluding its version heading; the paths must differ. The action publishes a notes_path output when it writes or plans the export. Dry runs do not write files. version and label also receive explicit template-syntax validation.

values:
  release_version: "1.2.0"

tasks:
  changelog:
    stage: Release
    steps:
      - uses: evin/changelog@v1
        with:
          path: CHANGELOG.md
          version: "${release_version}"
          label: "Preview"
          show_hashes: false
          sections:
            feat: Added
            fix: Fixed
            docs: Documentation
            chore: none

The label is opt-in and is copied as configured. It has no sequence rules and does not participate in version or tag calculation. A reusable value can be defined in namespace values and passed only to actions and destinations that should display it.

How history becomes release blocks

The Git provider runs a decorated log and supplies commits in newest-first order. For each commit, the action performs these operations:

  1. If the decoration contains a tag: <name> entry, close the current block and begin a block named exactly after that tag.

  2. If releases.commit_message can be compiled as a repository policy template and matches the subject, skip the release commit itself.

  3. Parse the subject with commits.message_format. If that fails, try the built-in Conventional Commit header type(scope)!: subject / type: subject parser.

  4. Add recognized commits to the current block. Unrecognized subjects are omitted.

Tags do not need to contain SemVer. A tag named preview-august creates a historical ## [preview-august] block. When one commit has multiple tag decorations, only the first tag: entry exposed in the refs string is used.

Section selection and ordering

For every parsed commit, the section is selected in this order:

PrioritySourceResult
1with.sections[commit_type]Custom heading, or omission when the value equals none ignoring case
2releases.change_types.<type>.changelog_sectionrepository policy heading
3repository policy fallbackFeatures for feat, Bug Fixes for fix, otherwise Other Changes

Section headings are sorted alphabetically inside each release block. Commit items retain newest-first history order within their section. When ticket linking is configured under releases.changelog.ticket_linking, matching ticket text in the subject is converted to Markdown links.

Given these commits:

feat(cli): add sequential execution override
fix(ui): reclaim the terminal after cancellation
docs: explain environment selection
chore: refresh lockfile

the configuration above renders the pending block as:

## [v1.2.0]

### Added

- **cli:** add sequential execution override

### Documentation

- explain environment selection

### Fixed

- **ui:** reclaim the terminal after cancellation

chore is absent because of the none override. With show_hashes: true, each list item ends in an abbreviated hash such as (8f13a9c).

Pending versions and tag formatting

When include_unreleased: true, commits above the newest tag begin in an internal Unreleased block. Its displayed name is selected as follows:

ConfigurationDisplayed heading
no versionunreleased_heading
version: 1.2.0First tags.name_format rendered with version = 1.2.0
version: v1.2.0Leading v characters are removed before applying the tag format

With the default tags.name_format: "v{version}", both version examples display v1.2.0.

An empty pending block is not rendered. Historical tagged blocks with commits are still rendered after it.

Rewrite and failure behavior

The generated document is preamble followed only by non-empty release blocks. The final content is trimmed to one trailing newline and written through the action SDK filesystem, which creates missing parent directories.

The action overwrites the destination. It does not merge with existing text or recover content below an existing preamble. Git history or configuration errors occur before the write; a filesystem error can fail at the final write. With section, the source is not overwritten; the body of the unique matching section is exported instead. Both v1.2.3 and 1.2.3 headings are recognized, but having both for the same version is ambiguous and fails.

Outputs

OutputAvailabilityMeaning
pathEvery successful normal or dry-run executionConfigured output path as a string
notes_pathA pending block is written, or an existing section is exportedConfigured notes path as a string
tagAt least one release block contains parsed commitsDisplay name of the first non-empty block
versionAt least one release block contains parsed commitsThat display name after removing leading v characters

The first non-empty block is normally the pending block, but it can be the newest historical tag when no pending commit was recognized. An empty history, or history containing only unrecognized/omitted commits, publishes only path.

Dry runs

A dry run still reads and groups real Git history and computes the same conditional version and tag outputs. It reports the blocks that would be rendered, publishes path, does not write the changelog, and marks the task unverified with changelog generation bypassed in dry-run. In section export mode it instead reads and validates the existing changelog, then plans the notes file write without modifying either file.

See repository policy configuration for commit formats, section definitions, tag naming, release-commit matching, and ticket linking.

action.evin/changelog@v1 Generate a changelog from Git history.

Configure changelog generation through with:.

action.evin/[email protected]_path Write the pending section body to a separate file.

Write a pending block or export an existing section as a review request or release body. Publishes a notes_path output.

action.evin/[email protected] Export an existing version section to `notes_path`.

Read the matching version section from path without regenerating the changelog. Requires notes_path.

Page source: reference/actions/30.changelog-action.5120.md