Release / build-and-push (push) Successful in 2m42s
Replace the image-only tag pipeline with a full release workflow that also publishes a Gitea Release whose body is the annotated tag's message, generated from Conventional Commits by git-cliff. No hand-written release notes are required. - cliff.toml: group commits (Features, Bug Fixes, Refactor, Documentation, Tests, Miscellaneous Tasks) with scopes and short-SHA links; emit only the current tag's section rather than the full history. - .gitea/workflows/release.yml: tag-driven. Reads the release body from the annotated tag (git tag -l --format), so the tag message and release body are a single source of truth. Idempotent create/PATCH; prints the Gitea API error body on failure so a 403 names the missing token scope instead of failing silently. Adds a workflow_dispatch tag input so manual re-runs target the right tag instead of the default branch. - Makefile: release VERSION=vX.Y.Z generates notes via git cliff --latest against a throwaway tag, then creates an annotated tag with --cleanup=verbatim so the markdown group headers are preserved (git's default cleanup strips lines starting with "#"). - release: project-attached wrapper accepting a positional version arg (./release 0.3.0 or ./release v0.3.0) and auto-prefixing v, for ergonomic one-command releases.
38 lines
1.3 KiB
TOML
38 lines
1.3 KiB
TOML
# git-cliff configuration — generates the body of each Gitea Release from
|
|
# Conventional Commits accumulated since the previous tag. Invoked in CI by
|
|
# orhun/git-cliff-action with --latest so only the current tag's section is
|
|
# emitted (no full history, no header — the Gitea Release title is the tag).
|
|
# Docs: https://git-cliff.org/docs/configuration
|
|
|
|
[changelog]
|
|
header = ""
|
|
body = """
|
|
{% 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 }} ({{ commit.id | truncate(length=7, end="") }})
|
|
{% endfor %}\
|
|
{% endfor %}\
|
|
"""
|
|
trim = true
|
|
footer = ""
|
|
|
|
[git]
|
|
conventional_commits = true
|
|
filter_unconventional = false
|
|
require_conventional = false
|
|
split_commits = false
|
|
commit_parsers = [
|
|
{ message = "^feat", group = "Features" },
|
|
{ message = "^fix", group = "Bug Fixes" },
|
|
{ message = "^perf", group = "Performance" },
|
|
{ message = "^refactor", group = "Refactor" },
|
|
{ message = "^docs", group = "Documentation" },
|
|
{ message = "^test", group = "Tests" },
|
|
{ message = "^chore|^ci", group = "Miscellaneous Tasks" },
|
|
{ message = ".*", group = "Other" },
|
|
]
|
|
filter_commits = false
|
|
tag_pattern = "v[0-9].*"
|
|
sort_commits = "oldest"
|