ci: auto-generate changelog (#6)
This commit is contained in:
parent
80b9b2cfa6
commit
41cccb5b52
|
@ -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 -}}
|
|
@ -0,0 +1,25 @@
|
||||||
|
style: github
|
||||||
|
template: CHANGELOG.tpl.md
|
||||||
|
info:
|
||||||
|
title: CHANGELOG
|
||||||
|
repository_url: https://github.com/thegeeklab/url-parser
|
||||||
|
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
|
|
@ -126,6 +126,15 @@ local PipelineBuildBinaries = {
|
||||||
'cd release/ && sha256sum * > sha256sum.txt',
|
'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',
|
name: 'publish',
|
||||||
image: 'plugins/github-release',
|
image: 'plugins/github-release',
|
||||||
|
|
|
@ -94,6 +94,13 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- cd release/ && sha256sum * > sha256sum.txt
|
- 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
|
- name: publish
|
||||||
image: plugins/github-release
|
image: plugins/github-release
|
||||||
settings:
|
settings:
|
||||||
|
@ -162,6 +169,6 @@ depends_on:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: d4a69a1a967392f8404fb8d708b3a8f8483118d5b7755c88fdb100ce52464680
|
hmac: 13e85e1a3c5f6f63c2ccf4c92e916edff86ffa6833baff2d8e4c72824aa2a11a
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
/url-parser*
|
/url-parser*
|
||||||
|
|
||||||
coverage.out
|
coverage.out
|
||||||
|
CHANGELOG.md
|
||||||
|
|
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,13 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
## v0.2.1 (2021-01-04)
|
|
||||||
|
|
||||||
### Docs
|
|
||||||
|
|
||||||
- add contributing information
|
|
||||||
|
|
||||||
### Others
|
|
||||||
|
|
||||||
- replace master by main as default branch
|
|
||||||
- **deps**: update dependencies
|
|
||||||
- use renovate preset config
|
|
Loading…
Reference in New Issue