Pull requests only, squash-merged, titled as conventional commits (checked); release-bot keeps a chore(release) pull request open, worked out by git-cliff, and merging it tags the release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
46 lines
1.9 KiB
TOML
46 lines
1.9 KiB
TOML
# git-cliff (https://git-cliff.org), for the release workflow (.gitea/workflows/release.yml): the next version and
|
|
# CHANGELOG.md, from the conventional commits on main (one per pull request, titled by it) since the last vX.Y.Z tag.
|
|
# feat → minor, fix/perf/revert → patch, a breaking change (`!` or BREAKING CHANGE:) → minor while 0.x, major after.
|
|
|
|
[changelog]
|
|
header = """
|
|
# Changelog
|
|
|
|
Written by release-bot's release pull requests, from the titles of the pull requests merged since the last release.
|
|
"""
|
|
body = """
|
|
{% if commits | length > 0 %}
|
|
{% 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 | striptags | trim }}
|
|
{% for commit in commits %}
|
|
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{% if commit.breaking %}**Breaking:** {% endif %}{{ commit.message | upper_first }}{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
"""
|
|
trim = true
|
|
|
|
[git]
|
|
conventional_commits = true
|
|
filter_unconventional = true
|
|
protect_breaking_commits = true
|
|
commit_parsers = [
|
|
{ message = "^chore\\(release\\)", skip = true },
|
|
{ message = "^feat", group = "<!-- 0 -->Features" },
|
|
{ message = "^fix", group = "<!-- 1 -->Fixes" },
|
|
{ message = "^perf", group = "<!-- 2 -->Performance" },
|
|
{ message = "^revert", group = "<!-- 3 -->Reverts" },
|
|
{ message = "^refactor", group = "<!-- 4 -->Refactoring" },
|
|
{ message = "^docs", group = "<!-- 5 -->Documentation" },
|
|
{ message = "^(build|ci|chore|style|test)", skip = true },
|
|
]
|
|
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
|
sort_commits = "oldest"
|
|
|
|
[bump]
|
|
features_always_bump_minor = true
|
|
breaking_always_bump_major = false
|
|
initial_tag = "v0.1.0"
|
|
# Matched against the commit's type: these alone don't make a release.
|
|
no_increment_regex = "^(chore|ci|docs|test|style|build|refactor)$"
|