Skip to content

Commit

Permalink
chore: add generate changelog script
Browse files Browse the repository at this point in the history
  • Loading branch information
ystarlongzi committed Jan 30, 2021
1 parent 64029fb commit 6732287
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"requireCleanWorkingDir": false,
"requireBranch": "main",
"tagAnnotation": "Release v${version}",
"tagName": "v${version}"
"tagName": "v${version}",
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template ./changelog.hbs"
},
"github": {
"draft": true,
Expand All @@ -13,5 +14,8 @@
},
"npm": {
"publish": true
},
"hooks": {
"after:bump": "npx auto-changelog -p"
}
}
13 changes: 13 additions & 0 deletions changelog.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{#each releases}}
{{#if @first}}
{{#each merges}}
- {{{message}}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}
{{/each}}
{{#each fixes}}
- {{{commit.subject}}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}}
{{/each}}
{{#each commits}}
- {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}}
{{/each}}
{{/if}}
{{/each}}
80 changes: 80 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@types/jest": "^26.0.20",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"auto-changelog": "^2.2.1",
"commitizen": "^4.2.3",
"dotenv-cli": "^4.0.0",
"eslint": "^7.7.0",
Expand Down

0 comments on commit 6732287

Please sign in to comment.