tftsr-devops_investigation/cliff.toml
Shaun Arman 6d2b69ffb0 feat(ci): add automated changelog generation via git-cliff
- Add cliff.toml with Tera template: feat/fix/perf/docs/refactor included;
  ci/chore/build/test/style excluded
- Bootstrap CHANGELOG.md from all existing semver tags (v0.1.0–v0.2.49)
- Add changelog job to auto-tag.yml: runs after autotag in parallel with
  build jobs; installs git-cliff v2.7.0 musl binary, generates CHANGELOG.md,
  PATCHes Gitea release body with per-release notes, commits CHANGELOG.md
  to master with [skip ci] to prevent re-trigger, uploads as release asset
- Add set -eu to all changelog job steps
- Null-check RELEASE_ID before API calls; create release if missing
  (race-condition fix: changelog finishes before build jobs create release)
- Add Changelog Generation section to docs/wiki/CICD-Pipeline.md
2026-04-12 21:56:16 -05:00

42 lines
1.1 KiB
TOML

[changelog]
header = """
# Changelog
All notable changes to TFTSR are documented here.
Commit types shown: feat, fix, perf, docs, refactor.
CI, chore, and build changes are excluded.
"""
body = """
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] — {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
## [Unreleased]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") -%}
### {{ group | upper_first }}
{% for commit in commits -%}
- {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }}
{% endfor %}
{% endfor %}
"""
footer = ""
trim = true
[git]
conventional_commits = true
filter_unconventional = true
tag_pattern = "v[0-9].*"
ignore_tags = "rc|alpha|beta"
sort_commits = "oldest"
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^perf", group = "Performance" },
{ message = "^docs", group = "Documentation" },
{ message = "^refactor", group = "Refactoring" },
{ message = "^ci|^chore|^build|^test|^style", skip = true },
]