feat(changelog): Aggiunto changelog automatico

This commit is contained in:
Maicol Battistini 2022-01-10 18:08:16 +01:00
parent 1da68b5eb8
commit 18c9045dac
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
5 changed files with 197 additions and 0 deletions

82
.chglog/CHANGELOG.tpl.md Normal file
View File

@ -0,0 +1,82 @@
# {{ .Info.Title }}
{{ if .Versions -}}
{{ if .Unreleased.CommitGroups -}}
<a name="unreleased"></a>
## Unreleased
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ if .Body }}
{{ indent .Body 4 }}
{{ end -}}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[ {{ .Tag.Name }}]( {{ $.Info.RepositoryURL }}/compare/ {{ .Tag.Previous.Name }}... {{ .Tag.Name }}) {{ else }} {{ .Tag.Name }} {{ end }}
> Released on {{ datetime "January 02, 2006" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ if .Body }}
{{ indent .Body 4 }}
{{ end -}}
{{ end }}
{{ end -}}
{{- if .RevertCommits -}}
### ⏪ Reverts
{{ range .RevertCommits -}}
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ .Revert.Header }}
{{ if .Body }}
{{ indent .Body 4 }}
{{ end -}}
{{ end }}
{{ end -}}
{{- if .MergeCommits -}}
### 🔀 Pull Requests
{{ range .MergeCommits -}}
- [`{{ .Hash.Short }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}) {{ .Header }}
{{ if .Body }}
{{ indent .Body 4 }}
{{ end -}}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

62
.chglog/config.yml Normal file
View File

@ -0,0 +1,62 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/maicol07/flarum-ext-sso
options:
commits:
filters:
Type:
- feat
- update
- perf
- fix
- fixed
- revert
- rename
- refactor
- style
- docs
- build
- ci
- chore
commit_groups:
sort_by: Custom
title_order:
- feat
- update
- perf
- fix
- fixed
- revert
- rename
- refactor
- style
- docs
- build
- ci
- chore
title_maps:
feat: ✨ Features
fix: 🐛 Bug Fixes
fixed: 🐛 Bug Fixes
perf: ⚡ Performance Improvements
docs: 📝 Docs changes
refactor: ♻ Code Refactoring
rename: 🚚 Renamed
revert: ⏪ Reverted
update: 🔄 Updates
build: 👷 Building scripts changes
chore: Other changes
style: 🎨 Code styling
ci: 👷 CI changes
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
- 💥

40
.github/workflows/changelog.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Build changelog
on:
push:
branches:
- master
workflow_dispatch:
inputs:
next_version:
description: "Next version tag"
required: false
commit_message:
description: "Commit message"
required: false
jobs:
package:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- uses: maicol07/github-changelog-action@patch-1
with:
next_version: ${{ github.event.inputs.next_version }}
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- run: "git commit -m \"changelog: 🔖 Updated changelog for commit ${{ github.sha }}\" -a"
if: ${{ !github.event.inputs.commit_message && !github.event.inputs.next_version }}
- run: "git commit -m \"release: 🔖 ${{ github.event.inputs.next_version }}\" -a"
if: ${{ !github.event.inputs.commit_message && github.event.inputs.next_version }}
- run: "git commit -m \"${{ github.event.inputs.commit_message }}\" -a"
if: ${{ github.event.inputs.commit_message }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

View File

@ -6,4 +6,17 @@
<component name="ProjectResources">
<resource url="https://cdn.jsdelivr.net/npm/@mdi/font@5.9.55/css/materialdesignicons.min.css" location="$PROJECT_DIR$" />
</component>
<component name="net.techminded.npmania.NpmaniaSettingsState">
<option name="actions">
<map>
<entry key="npm run-script build" value="npm run-script build" />
<entry key="npm run-script dev" value="npm run-script dev" />
<entry key="npm run-script preinstall" value="npm run-script preinstall" />
<entry key="npm run-script serve" value="npm run-script serve" />
<entry key="npm run-script serve-dev" value="npm run-script serve-dev" />
<entry key="npm run-script serve-watch" value="npm run-script serve-watch" />
<entry key="npm run-script watch" value="npm run-script watch" />
</map>
</option>
</component>
</project>

0
CHANGELOG.md → CHANGELOG.old.md Executable file → Normal file
View File