Skip to content

Commit a8ab0ea

Browse files
committed
fix: strict tag check on cliff.toml and tag fetch before git cliff
1 parent d7e12d1 commit a8ab0ea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/rust.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ jobs:
2323
fetch-tags: true
2424
token: ${{ secrets.GITHUB_TOKEN }}
2525

26+
- name: Ensure all tags are present
27+
run: git fetch --tags --force --prune
28+
2629
- name: Generate changelog
2730
uses: orhun/git-cliff-action@v4
2831
id: changelog
2932
with:
3033
config: cliff.toml
31-
args: --tag latest --strip header --output CHANGELOG.md
34+
# Use the latest tag vs previous tag automatically
35+
args: --latest --strip header --output CHANGELOG.md
3236
env:
3337
GITHUB_REPOSITORY: ${{ github.repository }}
3438
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cliff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ topo_order = false
121121
# Order of commits in each group/release within the changelog.
122122
# Allowed values: newest, oldest
123123
sort_commits = "newest"
124+
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
124125
# Enable link parsing for PR references and user mentions
125126
link_parsers = [
126127
{ pattern = "Merge pull request #([0-9]+)", href = "https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/$1" },

0 commit comments

Comments
 (0)