Skip to content

Commit 2b8e2d9

Browse files
committed
chore: tidy git-cliff output and limit to latest tag
1 parent e8d914a commit 2b8e2d9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.gitcliff.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ body = """
1010
## Release {{ version }}
1111
{% if date %}_{{ date }}_{% endif %}
1212
13+
{% if commits | length == 0 %}
14+
No notable changes.
15+
{% else %}
1316
### Highlights
1417
{% for group, commits in commits | group_by(attribute="type") %}
1518
#### {{ group | default(value="other") | upper }}
@@ -21,8 +24,10 @@ body = """
2124
2225
### Contributors
2326
{% for author, commits in commits | group_by(attribute="author") %}
24-
- {{ author }} ({{ commits | length }} commit{% if commits | length > 1 %}s{% endif %})
27+
{% set author_name = author.name | default(value=author.email | default(value=author)) %}
28+
- {{ author_name }} ({{ commits | length }} commit{% if commits | length > 1 %}s{% endif %})
2529
{% endfor %}
30+
{% endif %}
2631
"""
2732

2833
group_by = ["type"]

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
119119
120120
- name: Generate changelog from git history
121-
run: git-cliff --config .gitcliff.toml --tag ${{ steps.tag.outputs.VERSION }} --output release-notes.md
121+
run: git-cliff --config .gitcliff.toml --latest --output release-notes.md
122122
env:
123123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124124

0 commit comments

Comments
 (0)