Skip to content

Commit fcf2d86

Browse files
committed
chore: πŸ‘· Added changelog generator action
1 parent b923d57 commit fcf2d86

File tree

4 files changed

+78
-30
lines changed

4 files changed

+78
-30
lines changed

β€Ž.chglog/CHANGELOG.tpl.mdβ€Ž

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
### {{ .Title }}
1010
{{ range .Commits -}}
1111
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
12-
{{ if .Body }}
13-
{{ indent .Body 4 }}
14-
{{ end -}}
15-
{{ end }}
16-
{{ end -}}
17-
{{ end -}}
18-
{{ end -}}
12+
{{ if .Body }}
13+
{{ indent .Body 4 }}
14+
{{ end -}}
15+
{{ end }}
16+
{{ end -}}
17+
{{ end -}}
18+
{{ end -}}
1919

2020
{{ range .Versions }}
2121
<a name="{{ .Tag.Name }}"></a>
@@ -27,33 +27,33 @@
2727
### {{ .Title }}
2828
{{ range .Commits -}}
2929
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
30-
{{ if .Body }}
31-
{{ indent .Body 4 }}
32-
{{ end -}}
33-
{{ end }}
34-
{{ end -}}
30+
{{ if .Body }}
31+
{{ indent .Body 4 }}
32+
{{ end -}}
33+
{{ end }}
34+
{{ end -}}
3535

3636
{{- if .RevertCommits -}}
3737
### βͺ Reverts
3838

3939
{{ range .RevertCommits -}}
4040
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ .Revert.Header }}
41-
{{ if .Body }}
42-
{{ indent .Body 4 }}
43-
{{ end -}}
44-
{{ end }}
45-
{{ end -}}
41+
{{ if .Body }}
42+
{{ indent .Body 4 }}
43+
{{ end -}}
44+
{{ end }}
45+
{{ end -}}
4646

4747
{{- if .MergeCommits -}}
4848
### πŸ”€ Pull Requests
4949

5050
{{ range .MergeCommits -}}
5151
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ .Header }}
52-
{{ if .Body }}
53-
{{ indent .Body 4 }}
54-
{{ end -}}
55-
{{ end }}
56-
{{ end -}}
52+
{{ if .Body }}
53+
{{ indent .Body 4 }}
54+
{{ end -}}
55+
{{ end }}
56+
{{ end -}}
5757

5858
{{- if .NoteGroups -}}
5959
{{ range .NoteGroups -}}

β€Ž.chglog/config.ymlβ€Ž

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
style: github
22
template: CHANGELOG.tpl.md
33
info:
4-
title: CHANGELOG
5-
repository_url: https://github.com/maicol07/flarum-ext-sso
4+
title: Changelog
65
options:
76
commits:
8-
# filters:
9-
# Type:
10-
# - feat
11-
# - fix
12-
# - perf
13-
# - refactor
7+
filters:
8+
Type:
9+
- feat
10+
- update
11+
- perf
12+
- fix
13+
- fixed
14+
- revert
15+
- rename
16+
- refactor
17+
- style
18+
- docs
19+
- build
20+
- ci
21+
- chore
1422
commit_groups:
1523
sort_by: Custom
1624
title_order:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build changelog
2+
on:
3+
repository_dispatch:
4+
types: [ trigger-changelog-workflow ]
5+
workflow_dispatch:
6+
inputs:
7+
next_version:
8+
description: "Next version tag"
9+
required: false
10+
commit_message:
11+
description: "Commit message"
12+
required: false
13+
14+
jobs:
15+
package:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
submodules: recursive
23+
- uses: maicol07/github-changelog-action@master
24+
with:
25+
next_version: ${{ github.event.inputs.next_version }}
26+
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
27+
with:
28+
token: '${{ secrets.GITHUB_TOKEN }}'
29+
- run: "git commit -m \"changelog: πŸ”– Updated changelog for commit ${{ github.sha }}\" -a"
30+
if: ${{ !github.event.inputs.commit_message && !github.event.inputs.next_version }}
31+
- run: "git commit -m \"release: πŸ”– ${{ github.event.inputs.next_version }}\" -a"
32+
if: ${{ !github.event.inputs.commit_message && github.event.inputs.next_version }}
33+
- run: "git commit -m \"${{ github.event.inputs.commit_message }}\" -a"
34+
if: ${{ github.event.inputs.commit_message }}
35+
- name: Push changes
36+
uses: ad-m/github-push-action@master
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
branch: ${{ github.ref }}

β€Ž.idea/inspectionProfiles/Project_Default.xmlβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)