diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..95a8415 --- /dev/null +++ b/.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 -}} diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..0c7f5f2 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,25 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/thegeeklab/docker-autotag +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 diff --git a/.drone.jsonnet b/.drone.jsonnet index 401f18a..e4e9af0 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -141,6 +141,15 @@ local PipelineBuildPackage = { 'cd dist/ && 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-github', image: 'plugins/github-release', diff --git a/.drone.yml b/.drone.yml index 1040768..171cc60 100644 --- a/.drone.yml +++ b/.drone.yml @@ -160,6 +160,13 @@ steps: commands: - cd dist/ && 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-github image: plugins/github-release settings: @@ -533,6 +540,6 @@ depends_on: --- kind: signature -hmac: beed171bec75be9d39412efd41a88562d2f30ffcc4b3783821c40dcce2128d32 +hmac: 4f13a27058219c5fe3962fa2d0e77a27f0bc7ebe6b87f76df53f889764e10a66 ... diff --git a/.gitignore b/.gitignore index 620329a..b238ef5 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,6 @@ env*/ .pytest_cache pip-wheel-metadata + +# Misc +CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0e69112..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -# Changelog - -## v0.2.0 (2021-01-03) - -### Docs - -- add contributing information - -### Others - -- migrate to poetry -- replace master by main as default branch -- **deps**: pin docker digests ([#4](https://github.com/thegeeklab/docker-autotag/issues/4)) -- **docker**: use standalone dockerfiles for multiarch -- **docker**: switch to org.opencontainers image labels -- use renovate preset config - -### Breaking Changes - -- drop Python 3.5 support