ci: auto-generate changelog (#27)

This commit is contained in:
Robert Kaussow 2021-02-11 21:22:15 +01:00 committed by GitHub
parent 9d648134d9
commit afb6720add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 16 deletions

23
.chglog/CHANGELOG.tpl.md Executable file
View File

@ -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 -}}

25
.chglog/config.yml Executable file
View File

@ -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

View File

@ -107,6 +107,13 @@ steps:
commands: commands:
- cd dist/ && sha256sum * > ../sha256sum.txt - 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 - name: release
image: plugins/github-release image: plugins/github-release
settings: settings:
@ -118,10 +125,15 @@ steps:
note: CHANGELOG.md note: CHANGELOG.md
overwrite: true overwrite: true
title: ${DRONE_TAG} title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger: trigger:
ref: ref:
- refs/heads/master
- refs/tags/** - refs/tags/**
- refs/pull/**
depends_on: depends_on:
- test - test
@ -241,6 +253,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 6c10fcb22b38b6041436150746c4d8f5f32629e2f144cd493359e8d78f8d5ef7 hmac: b1db1110df60514eaf9ba45c1e54cb0491b5136bfc4b9b0b332a2ad3e3697fb1
... ...

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ node_modules/
lhci_reports/ lhci_reports/
exampleSite/themes/ exampleSite/themes/
exampleSite/public/ exampleSite/public/
CHANGELOG.md
# auto-generated files # auto-generated files
layouts/partials/icons-svg-symbols.html layouts/partials/icons-svg-symbols.html

View File

@ -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))