Repository navigation
ci: generate CHANGELOG.md and release notes with git-cliff on release - #166
Merged
Merged
Conversation
cliff.toml builds the changelog from Conventional Commits (feat, fix, perf, refactor and docs). The release workflow regenerates CHANGELOG.md with the new version as the latest release, commits it with the version bump, and uses the new section as the GitHub Release notes.
Generated with git-cliff from the existing tags. v1.2.0 is added by the release workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generate
CHANGELOG.mdautomatically with git-cliff:cliff.tomlbuilds the changelog from Conventional Commits.feat,fix,perf,refactoranddocsare listed in that order;release,test,ci,chore, merge commits and non-conventional commits are left out.releaseworkflow regeneratesCHANGELOG.md(with the new version as the latest release) before publishing, commits it together with the version bump, and uses the new section as the GitHub Release notes. If a re-release has no new commits, it falls back to--generate-notes.CHANGELOG.mdalready covers v0.1.0 through v1.1.0, generated from the existing tags. v1.2.0 will be added by the first release run.CONTRIBUTING(en/ja, throughbase/CONTRIBUTING.base.md) documents the commit format and that the file is not edited by hand.Why?
Release notes were GitHub's auto-generated list of merge commits, and there was no changelog in the repository. The commit history is already in Conventional Commits form, so the changelog can come from it without a new dependency in
package.json(the workflow usesorhun/git-cliff-action; locallynpx git-cliff -o CHANGELOG.mdworks).I could not run the workflow itself here; I ran the same git-cliff commands locally (
--tag v1.2.0for the changelog and--unreleased --strip all --tag v1.2.0for the notes) and checked the YAML parses. The first real run is the first full test.Related issue(s)
closes
Check
CONTRIBUTING.md(rules)pnpm check(lint & format)pnpm test(functions test)pnpm build(dist/)pnpm test:coverageand check nothing new went uncovered