Skip to content

Commit ea668dc

Browse files
author
Enda Phelan
committed
chore: add git-chglog
1 parent a99c236 commit ea668dc

File tree

7 files changed

+5446
-10
lines changed

7 files changed

+5446
-10
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{{ if .Versions -}}
2+
<a name="unreleased"></a>
3+
## [Unreleased]
4+
5+
{{ if .Unreleased.CommitGroups -}}
6+
{{ range .Unreleased.CommitGroups -}}
7+
### {{ .Title }}
8+
{{ range .Commits -}}
9+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
10+
{{ end }}
11+
{{ end -}}
12+
{{ end -}}
13+
{{ end -}}
14+
15+
{{ range .Versions }}
16+
<a name="{{ .Tag.Name }}"></a>
17+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
18+
{{ range .CommitGroups -}}
19+
### {{ .Title }}
20+
{{ range .Commits -}}
21+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
22+
{{ end }}
23+
{{ end -}}
24+
25+
{{- if .NoteGroups -}}
26+
{{ range .NoteGroups -}}
27+
### {{ .Title }}
28+
{{ range .Notes }}
29+
{{ .Body }}
30+
{{ end }}
31+
{{ end -}}
32+
{{ end -}}
33+
{{ end -}}
34+
35+
{{- if .Versions }}
36+
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
37+
{{ range .Versions -}}
38+
{{ if .Tag.Previous -}}
39+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
40+
{{ end -}}
41+
{{ end -}}
42+
{{ end -}}

.chglog/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/craicoverflow/git-chglog-action
6+
options:
7+
commits:
8+
# filters:
9+
# Type:
10+
# - feat
11+
# - fix
12+
# - perf
13+
# - refactor
14+
commit_groups:
15+
# title_maps:
16+
# feat: Features
17+
# fix: Bug Fixes
18+
# perf: Performance Improvements
19+
# refactor: Code Refactoring
20+
header:
21+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
22+
pattern_maps:
23+
- Type
24+
- Scope
25+
- Subject
26+
notes:
27+
keywords:
28+
- BREAKING CHANGE

action.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'git-chglog action'
2+
description: 'GitHub Action for git-chglog. Anytime, anywhere, Write your CHANGELOG.'
3+
author: 'crazy-max'
4+
branding:
5+
color: 'green'
6+
icon: 'package'
7+
8+
inputs:
9+
tag_query:
10+
description: 'specify a range of tags to include in the CHANGELOG'
11+
required: false
12+
version:
13+
description: 'git-chglog version'
14+
default: 'latest'
15+
required: false
16+
config:
17+
description: 'specifies a different configuration file to pick up'
18+
default: '.chglog/config.yml'
19+
required: false
20+
output:
21+
description: 'output path and filename for the changelogs. If not specified, output to stdout'
22+
required: false
23+
workdir:
24+
description: 'Working directory (below repository root)'
25+
default: '.'
26+
required: false
27+
28+
runs:
29+
using: 'node12'
30+
main: 'dist/index.js'

0 commit comments

Comments
 (0)