ci: auto-generate changelog
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2021-02-11 20:55:50 +01:00
parent 8baec4c40c
commit 59f5b17b63
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
3 changed files with 60 additions and 3 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://gitea.rknet.org/docker/vnu
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

@ -57,6 +57,15 @@ steps:
depends_on:
- dryrun
- 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}
depends_on:
- tags
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20
settings:
@ -73,7 +82,7 @@ steps:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
- changelog
- name: publish-quay
image: thegeeklab/drone-docker-buildx:20
@ -92,7 +101,7 @@ steps:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
- changelog
- name: publish-gitea
image: plugins/gitea-release
@ -185,6 +194,6 @@ depends_on:
---
kind: signature
hmac: 419b7fb05571206fe24ea5ff8d8550ec82ddb2fb1b095dc6c602696e86097ce6
hmac: 076912fdb7964ab4069e636ac820b778695f3ec2804347de37c02ac27d92318b
...