Browse Source

ci: auto-generate changelog (#7)

pull/8/head v19.03.3
Robert Kaussow 3 months ago
committed by GitHub
parent
commit
1870fd9779
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      .chglog/CHANGELOG.tpl.md
  2. 25
      .chglog/config.yml
  3. 9
      .drone.jsonnet
  4. 9
      .drone.yml
  5. 1
      .gitignore
  6. 11
      CHANGELOG.md

23
.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 -}}

25
.chglog/config.yml

@ -0,0 +1,25 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/thegeeklab/drone-docker
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

9
.drone.jsonnet

@ -115,6 +115,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',

9
.drone.yml

@ -87,6 +87,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:
@ -469,6 +476,6 @@ depends_on:
---
kind: signature
hmac: a4e6dd2ab6bcc3383abf1b8cce73ca58834ecb0709a01db887f8cd09ad16050e
hmac: 1c7dc109e0955ae8d3e01358642eff449ceb23ce888d35dfed3206060af11db9
...

1
.gitignore

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

11
CHANGELOG.md

@ -1,11 +0,0 @@
# Changelog
## v19.03.2 (2021-01-22)
### New Features
- set DOCKER_IMAGE_CREATED as build-arg
### Others
- **deps**: update dependencies
Loading…
Cancel
Save