-
-
Notifications
You must be signed in to change notification settings - Fork 476
ci: add git-cliff changelog generation on release tags #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| [changelog] | ||
| header = """ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
| """ | ||
| 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 | upper_first }} | ||
| {% for commit in commits %} | ||
| - {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }}\ | ||
| {% if commit.breaking %} [**BREAKING**]{% endif %} \ | ||
| ({{ commit.id | truncate(length=7, end="") }})\ | ||
| {% endfor %} | ||
| {% endfor %}\n | ||
| """ | ||
| footer = "" | ||
| trim = true | ||
|
|
||
| [git] | ||
| conventional_commits = true | ||
| filter_unconventional = true | ||
| split_commits = false | ||
| commit_preprocessors = [] | ||
| commit_parsers = [ | ||
| { message = "^feat", group = "Features" }, | ||
| { message = "^fix", group = "Bug Fixes" }, | ||
| { message = "^perf", group = "Performance" }, | ||
| { message = "^refactor", group = "Refactoring" }, | ||
| { message = "^doc", group = "Documentation" }, | ||
| { message = "^test", group = "Testing" }, | ||
| { message = "^ci", group = "CI" }, | ||
| { message = "^build", group = "Build" }, | ||
| { message = "^chore", group = "Miscellaneous" }, | ||
| { message = "^revert", group = "Reverted Commits" }, | ||
| ] | ||
| protect_breaking_commits = false | ||
| filter_commits = false | ||
| tag_pattern = "v[0-9].*" | ||
| skip_tags = "" | ||
| ignore_tags = "" | ||
| topo_order = false | ||
| sort_commits = "oldest" | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||||||
| name: Release | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| tags: | ||||||||||
| - 'v*.*.*' | ||||||||||
|
||||||||||
| - 'v*.*.*' | |
| - 'v*.*.*' | |
| - 'v*.*.*-*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: added v*..-* tag pattern at line 7 to cover pre-release tags like v1.0.0-alpha.1. Should be marked outdated.
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description says it will auto-generate CHANGELOG.md on tag push, which typically implies updating the repository file. This workflow only generates the file for use as an artifact/release body and does not commit it back to the repo. Either adjust the description (to clarify it’s generated for release notes only) or add a step to commit and push the updated CHANGELOG.md to the default branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: PR description updated to clarify changelog is generated for the GitHub Release body only, not committed back to repo. Should be marked outdated.
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow doesn’t declare permissions. In orgs/repos where the default GITHUB_TOKEN permission is read-only, softprops/action-gh-release can fail to create/publish a release. Add an explicit permissions: contents: write (either at workflow or publish job scope) to make this reliable.
| needs: changelog | |
| needs: changelog | |
| permissions: | |
| contents: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: permissions: contents: write added at line 39-40. Should be marked outdated.
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow doesn’t declare permissions. In orgs/repos where the default GITHUB_TOKEN permission is read-only, softprops/action-gh-release can fail to create/publish a release. Add an explicit permissions: contents: write (either at workflow or publish job scope) to make this reliable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: same permissions block covers this. Should be marked outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description calls out grouped changelog sections including “CI”, but the parser currently maps
cicommits into the catch-all “Miscellaneous” group (^chore|^ci|^build). Either adjust the commit parser groups so^ciis grouped under a dedicated “CI” section (and optionally separatebuild/choretoo), or update the PR description to match the actual grouping.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: ^ci now maps to dedicated 'CI' group (line 40), separate from 'Miscellaneous'. Should be marked outdated.