Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5c983986bd
|
|||
|
e466a8eada
|
|||
|
2ee3630392
|
|||
|
d1a0746b3e
|
|||
| 9fbf7681ed | |||
|
387462cfc9
|
|||
|
|
8e35f02191 | ||
|
0f35839fb4
|
|||
|
|
a055276849 |
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.16"
|
current_version = "0.1.18"
|
||||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||||
serialize = ["{major}.{minor}.{patch}"]
|
serialize = ["{major}.{minor}.{patch}"]
|
||||||
search = "{current_version}"
|
search = "{current_version}"
|
||||||
|
|||||||
38
.chglog/CHANGELOG.tpl.md
Executable file
38
.chglog/CHANGELOG.tpl.md
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
{{ range .Versions }}
|
||||||
|
<a name="{{ .Tag.Name }}"></a>
|
||||||
|
## {{ 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 -}}
|
||||||
|
* {{ .Subject }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- if .RevertCommits -}}
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
{{ range .RevertCommits -}}
|
||||||
|
* {{ .Revert.Header }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- if .MergeCommits -}}
|
||||||
|
### Pull Requests
|
||||||
|
|
||||||
|
{{ range .MergeCommits -}}
|
||||||
|
* {{ .Header }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- if .NoteGroups -}}
|
||||||
|
{{ range .NoteGroups -}}
|
||||||
|
### {{ .Title }}
|
||||||
|
|
||||||
|
{{ range .Notes }}
|
||||||
|
{{ .Body }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
27
.chglog/config.yml
Executable file
27
.chglog/config.yml
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
style: github
|
||||||
|
template: CHANGELOG.tpl.md
|
||||||
|
info:
|
||||||
|
title: CHANGELOG
|
||||||
|
repository_url: https://git.theprivateserver.de/PHB/workflowbumptester
|
||||||
|
options:
|
||||||
|
commits:
|
||||||
|
# filters:
|
||||||
|
# Type:
|
||||||
|
# - feat
|
||||||
|
# - fix
|
||||||
|
# - perf
|
||||||
|
# - refactor
|
||||||
|
commit_groups:
|
||||||
|
# title_maps:
|
||||||
|
# feat: Features
|
||||||
|
# fix: Bug Fixes
|
||||||
|
# perf: Performance Improvements
|
||||||
|
# refactor: Code Refactoring
|
||||||
|
header:
|
||||||
|
pattern: "^(\\w*)\\:\\s(.*)$"
|
||||||
|
pattern_maps:
|
||||||
|
- Type
|
||||||
|
- Subject
|
||||||
|
notes:
|
||||||
|
keywords:
|
||||||
|
- BREAKING CHANGE
|
||||||
@@ -1,17 +1,10 @@
|
|||||||
name: Bump version
|
name: Bump version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
on:
|
||||||
bump-type:
|
release:
|
||||||
description: 'Bump type'
|
types: [published]
|
||||||
required: true
|
|
||||||
default: 'patch'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- major
|
|
||||||
- minor
|
|
||||||
- patch
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -19,20 +12,56 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set Git identity
|
- name: Setup git-chglog
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Gitea CI"
|
CHGLOG_VERSION="0.15.4"
|
||||||
git config user.email "ci@git.theprivateserver.de"
|
curl -o git-chglog -L "https://github.com/git-chglog/git-chglog/releases/download/${CHGLOG_VERSION}/git-chglog_linux_amd64"
|
||||||
- name: Bump version
|
chmod +x git-chglog
|
||||||
id: bump
|
|
||||||
uses: callowayproject/bump-my-version@master
|
|
||||||
env:
|
|
||||||
BUMPVERSION_TAG: "true"
|
|
||||||
with:
|
|
||||||
args: ${{ inputs.bump-type }}
|
|
||||||
github-token: ${{ secrets.TOKEN }}
|
|
||||||
|
|
||||||
- name: Check
|
- name: Generate CHANGELOG.md
|
||||||
if: steps.bump.outputs.bumped == 'true'
|
id: generate
|
||||||
run: |
|
run: |
|
||||||
echo "Version was bumped from ${{ steps.bump.outputs.previous-version }} to ${{ steps.bump.outputs.current-version }}!"
|
rm -f CHANGELOG.md
|
||||||
|
./git-chglog -o CHANGELOG.md
|
||||||
|
if git diff --quiet CHANGELOG.md; then
|
||||||
|
echo "changes=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "changes=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
run: rm git-chglog
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
if: steps.generate.outputs.changes == 'true'
|
||||||
|
uses: peter-evans/create-pull-request@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
commit-message: "chore: update CHANGELOG.md"
|
||||||
|
title: "📝 Update Changelog"
|
||||||
|
body: |
|
||||||
|
This PR updates the CHANGELOG.md to include all releases.
|
||||||
|
- Generated using git-chglog
|
||||||
|
- Triggered by: ${{ github.event_name }}
|
||||||
|
- Auto-merge enabled
|
||||||
|
branch: update-changelog-${{ github.run_id }}
|
||||||
|
base: main
|
||||||
|
delete-branch: true
|
||||||
|
labels: documentation, automated-pr
|
||||||
|
|
||||||
|
- name: Enable Auto-merge
|
||||||
|
if: steps.generate.outputs.changes == 'true'
|
||||||
|
uses: pascalgn/automerge-action@v0.15.0
|
||||||
|
with:
|
||||||
|
mergeMethod: squash
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
pullRequestNumber: ${{ steps.create-pull-request.outputs.pullRequestNumber }}
|
||||||
|
commitMessage: "chore: update CHANGELOG.md"
|
||||||
|
title: "📝 Update Changelog"
|
||||||
|
body: |
|
||||||
|
This PR updates the CHANGELOG.md to include all releases.
|
||||||
|
- Generated using git-chglog
|
||||||
|
- Triggered by: ${{ github.event_name }}
|
||||||
Reference in New Issue
Block a user