Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit d32a1ee

Browse files
authored
ci: auto-generate changelog (#10)
1 parent b0a0e14 commit d32a1ee

File tree

6 files changed

+66
-12
lines changed

6 files changed

+66
-12
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
{{ range .Versions -}}
4+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
5+
6+
{{ range .CommitGroups -}}
7+
### {{ .Title }}
8+
9+
{{ range .Commits -}}
10+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
11+
{{ end }}
12+
{{ end -}}
13+
14+
{{- if .NoteGroups -}}
15+
{{ range .NoteGroups -}}
16+
### {{ .Title }}
17+
18+
{{ range .Notes }}
19+
{{ .Body }}
20+
{{ end }}
21+
{{ end -}}
22+
{{ end -}}
23+
{{ end -}}

.chglog/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/thegeeklab/drone-docker-buildx
6+
options:
7+
commit_groups:
8+
title_maps:
9+
feat: Features
10+
fix: Bug Fixes
11+
perf: Performance Improvements
12+
refactor: Code Refactoring
13+
chore: Others
14+
test: Testing
15+
ci: CI Pipeline
16+
docs: Documentation
17+
header:
18+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
19+
pattern_maps:
20+
- Type
21+
- Scope
22+
- Subject
23+
notes:
24+
keywords:
25+
- BREAKING CHANGE

.drone.jsonnet

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ local PipelineBuildBinaries = {
114114
'cd release/ && sha256sum * > sha256sum.txt',
115115
],
116116
},
117+
{
118+
name: 'changelog',
119+
image: 'thegeeklab/git-chglog',
120+
commands: [
121+
'git fetch -tq',
122+
'git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}',
123+
'git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}',
124+
],
125+
},
117126
{
118127
name: 'publish',
119128
image: 'plugins/github-release',

.drone.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ steps:
8686
commands:
8787
- cd release/ && sha256sum * > sha256sum.txt
8888

89+
- name: changelog
90+
image: thegeeklab/git-chglog
91+
commands:
92+
- git fetch -tq
93+
- git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}
94+
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
95+
8996
- name: publish
9097
image: plugins/github-release
9198
settings:
@@ -381,6 +388,6 @@ depends_on:
381388

382389
---
383390
kind: signature
384-
hmac: f3927845c8739c33bd85d97dc6a81e73b88de2bfb4e592b6943db9e890bb4d47
391+
hmac: 569c62e3b5bb765f163cddd2755319d8b1d3d10481ce5955ff8f4e7d54ce6ac4
385392

386393
...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/drone-docker-buildx*
33

44
coverage.out
5+
CHANGELOG.md

CHANGELOG.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)