Skip to content

Commit 522bf8b

Browse files
author
Enda
authored
Merge pull request #1 from craicoverflow/dev
ci: use git-chglog action
2 parents 36b7264 + beadc5b commit 522bf8b

File tree

3 files changed

+44
-37
lines changed

3 files changed

+44
-37
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,23 @@
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-
151
{{ range .Versions }}
162
<a name="{{ .Tag.Name }}"></a>
17-
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
3+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
4+
185
{{ range .CommitGroups -}}
196
### {{ .Title }}
7+
208
{{ range .Commits -}}
21-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
9+
* {{ .Subject }}
10+
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
2211
{{ end }}
2312
{{ end -}}
2413

2514
{{- if .NoteGroups -}}
2615
{{ range .NoteGroups -}}
2716
### {{ .Title }}
17+
2818
{{ range .Notes }}
2919
{{ .Body }}
3020
{{ end }}
3121
{{ end -}}
3222
{{ 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 -}}
4223
{{ end -}}

.chglog/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ style: github
22
template: CHANGELOG.tpl.md
33
info:
44
title: CHANGELOG
5-
repository_url: https://github.com/craicoverflow/install-git-chglog
5+
repository_url: https://github.com/redhat-developer/app-services-cli
66
options:
7+
tag_filter_pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
78
commits:
8-
# filters:
9-
# Type:
10-
# - feat
11-
# - fix
12-
# - perf
13-
# - refactor
9+
filters:
10+
Type:
11+
- feat
12+
- fix
13+
- perf
1414
commit_groups:
15-
# title_maps:
16-
# feat: Features
17-
# fix: Bug Fixes
18-
# perf: Performance Improvements
19-
# refactor: Code Refactoring
15+
title_maps:
16+
feat: Features
17+
fix: Bug Fixes
18+
perf: Performance Improvements
19+
refactor: Code Refactoring
2020
header:
2121
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
2222
pattern_maps:

.github/workflows/changelog.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
package:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
-
16+
name: Install git-chglog
17+
uses: craicoverflow/[email protected]
18+
-
19+
name: Generate a CHANGELOG
20+
run: git-chglog -o CHANGELOG.md
21+
22+
- uses: stefanzweifel/git-auto-commit-action@v4
23+
with:
24+
branch: main
25+
file_pattern: CHANGELOG.md
26+
commit_message: 'chore: update CHANGELOG'

0 commit comments

Comments
 (0)