ci: auto-generate changelog (#10)

This commit is contained in:
Robert Kaussow 2021-02-15 10:46:58 +01:00 committed by GitHub
parent b0a0e149b3
commit d32a1ee2d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 12 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/drone-docker-buildx
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

@ -114,6 +114,15 @@ local PipelineBuildBinaries = {
'cd release/ && 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: 'publish',
image: 'plugins/github-release',

View File

@ -86,6 +86,13 @@ steps:
commands:
- cd release/ && 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: publish
image: plugins/github-release
settings:
@ -381,6 +388,6 @@ depends_on:
---
kind: signature
hmac: f3927845c8739c33bd85d97dc6a81e73b88de2bfb4e592b6943db9e890bb4d47
hmac: 569c62e3b5bb765f163cddd2755319d8b1d3d10481ce5955ff8f4e7d54ce6ac4
...

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/drone-docker-buildx*
coverage.out
CHANGELOG.md

View File

@ -1,11 +0,0 @@
# Changelog
## v20.10.2 (2021-01-22)
### New Features
- set DOCKER_IMAGE_CREATED as build-arg
### Others
- **deps**: update dependencies