diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..95a8415 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,23 @@ +# Changelog + +{{ range .Versions -}} +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }}) + +{{ range .CommitGroups -}} +### {{ .Title }} + +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} + +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..5f72f28 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,25 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/thegeeklab/hugo-geekblog +options: + commit_groups: + title_maps: + feat: Features + fix: Bug Fixes + perf: Performance Improvements + refactor: Code Refactoring + chore: Others + test: Testing + ci: CI Pipeline + docs: Documentation + header: + pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" + pattern_maps: + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE diff --git a/.drone.yml b/.drone.yml index c1f4af3..47b6d6a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -107,6 +107,13 @@ steps: commands: - cd dist/ && sha256sum * > ../sha256sum.txt +- name: changelog + image: thegeeklab/git-chglog + commands: + - git fetch -tq + - git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased} + - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased} + - name: release image: plugins/github-release settings: @@ -118,10 +125,15 @@ steps: note: CHANGELOG.md overwrite: true title: ${DRONE_TAG} + when: + ref: + - refs/tags/** trigger: ref: + - refs/heads/master - refs/tags/** + - refs/pull/** depends_on: - test @@ -241,6 +253,6 @@ depends_on: --- kind: signature -hmac: 6c10fcb22b38b6041436150746c4d8f5f32629e2f144cd493359e8d78f8d5ef7 +hmac: b1db1110df60514eaf9ba45c1e54cb0491b5136bfc4b9b0b332a2ad3e3697fb1 ... diff --git a/.gitignore b/.gitignore index bc59a90..1643643 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ node_modules/ lhci_reports/ exampleSite/themes/ exampleSite/public/ +CHANGELOG.md # auto-generated files layouts/partials/icons-svg-symbols.html diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index a7a08b1..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -## v0.8.0 (2021-01-24) - -### BREAKING CHANGES - -- `contact.md` file auto-detection was removed in favor of the new extra menu, see [docs](https://hugo-geekblog.geekdocs.de/posts/getting-started/#extra-menu) - -### Features - -- add optional extra menu to site navigations ([#26](https://github.com/thegeeklab/hugo-geekblog/issues/26)) - -### Others - -- **deps:** update dependency gulp-iconfont to v11 ([#24](https://github.com/thegeeklab/hugo-geekblog/issues/24))