8971121167
CI / Sync project version with tag (hand-pushed tags only) (pull_request) Has been skipped
CI / Publish package to Gitea package registry (pull_request) Has been skipped
CI / Lint (ruff check) (pull_request) Successful in 19s
CI / Type check (ty) (pull_request) Successful in 16s
CI / Format (ruff format) (pull_request) Successful in 24s
CI / Tests (pull_request) Successful in 2m27s
CI / Release (bump, changelog, badges, tag) on merge to master (pull_request) Has been skipped
Every merge to master previously produced three separate commits (bump version -> update changelog, tagged here -> update README badges), so the published tag never carried the current release's own README badges, and the badge commit leaked into the next release's changelog since no cliff.toml parser skipped it. - Extract the bump/changelog/badge assembly into .gitea/scripts/release-commit.sh, used by both the merge-to-master path and the hand-pushed-tag sync path, so every tag now points at one complete "chore: release vX.Y.Z" commit. Push the commit and its tag atomically. - sync-version-on-tag now refuses to touch a tag whose commit isn't reachable from master (rather than silently rewriting an unreviewed tree), and builds a proper release commit via the same script when it does need to correct a hand-pushed tag's version. - publish-package now depends only on sync-version-on-tag: since a tag can only pass that guard if its commit is already on master, and master is always fully checked, re-running the lint/type/test matrix on tag pushes was redundant. - Factor the repeated checkout/setup-uv/env/sync steps into a local composite action (.gitea/actions/setup), fix `test`'s `needs` to include ruff-format, and bump actions/upload-artifact to v4. - cliff.toml: skip "chore: release ..." commits from the changelog. Verified by dry-running release-commit.sh against a scratch worktree for all three code paths (patch bump, --no-bump, explicit VERSION sync), confirming idempotency and that the resulting commit carries pyproject.toml, .bumpversion.toml, uv.lock, CHANGELOG.md and README.md together. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NnotyatakKNS4NLjDbfYw1
53 lines
1.7 KiB
TOML
53 lines
1.7 KiB
TOML
# git-cliff configuration — see https://git-cliff.org/docs/configuration
|
|
#
|
|
# Commit messages in this repo aren't Conventional Commits; they're plain
|
|
# imperative summaries like "Add class-balanced secondary particle-type loss
|
|
# (gitea #44)". Parsing here is tuned to that convention rather than to
|
|
# feat:/fix:-style prefixes.
|
|
|
|
[changelog]
|
|
header = "# Changelog\n\n"
|
|
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 | striptags | trim | upper_first }}
|
|
{% for commit in commits %}
|
|
- {{ commit.message | upper_first }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
"""
|
|
trim = true
|
|
render_always = true
|
|
postprocessors = []
|
|
|
|
[git]
|
|
conventional_commits = false
|
|
filter_unconventional = false
|
|
require_conventional = false
|
|
split_commits = false
|
|
# Keep only the commit subject (first line), then linkify "(gitea #N)".
|
|
commit_preprocessors = [
|
|
{ pattern = "(?s)\n.*", replace = "" },
|
|
{ pattern = "\\(gitea #(\\d+)\\)", replace = "[gitea #${1}](https://git.larsbogner.de/lars/giant/issues/${1})" },
|
|
]
|
|
protect_breaking_commits = false
|
|
commit_parsers = [
|
|
{ message = "^Merge ", skip = true },
|
|
{ message = "^chore: (release|bump version|update changelog|sync project version)", skip = true },
|
|
{ message = "^Add", group = "<!-- 0 -->Added" },
|
|
{ message = "^(Fix|Clamp|Clip)", group = "<!-- 1 -->Fixed" },
|
|
{ message = "^(Remove|Drop|Deprecate)", group = "<!-- 2 -->Removed" },
|
|
{ message = ".*", group = "<!-- 3 -->Changed" },
|
|
]
|
|
filter_commits = false
|
|
link_parsers = []
|
|
use_branch_tags = false
|
|
topo_order = false
|
|
topo_order_commits = true
|
|
sort_commits = "oldest"
|
|
recurse_submodules = false
|