Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdc46d7f37 | ||
|
|
4259f49d94 | ||
|
95e2cdcdce
|
|||
|
|
55d0cb50e6 | ||
|
3424805d4e
|
|||
|
|
5c0fcbdb66 | ||
|
f35e19d44d
|
|||
|
|
ef54d663d2 | ||
|
2ab0dcd60b
|
|||
|
|
9a2b6eeafc | ||
|
4c6d4a7c6f
|
|||
| b3decbcd05 | |||
| 2aed04e150 | |||
|
5c983986bd
|
|||
|
e466a8eada
|
|||
|
2ee3630392
|
|||
|
d1a0746b3e
|
|||
| 9fbf7681ed | |||
|
387462cfc9
|
|||
|
|
8e35f02191 | ||
|
0f35839fb4
|
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.17"
|
current_version = "0.1.24"
|
||||||
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
|
||||||
29
.gitea/changelog-config.json
Normal file
29
.gitea/changelog-config.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"title": "## 🚀 Features",
|
||||||
|
"labels": ["add","Add"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 🐛 Fixes",
|
||||||
|
"labels": ["fix","Fix"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 🧪 Upgrade",
|
||||||
|
"labels": ["upgrade","Upgrade","Clean"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label_extractor": [
|
||||||
|
{
|
||||||
|
"pattern": "(\\w+) (.+)",
|
||||||
|
"target": "$1",
|
||||||
|
"on_property": "title"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort": "ASC",
|
||||||
|
"template": "${{CHANGELOG}}",
|
||||||
|
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
|
||||||
|
"empty_template": "- no changes",
|
||||||
|
"max_pull_requests": 1000,
|
||||||
|
"max_back_track_time_days": 1000
|
||||||
|
}
|
||||||
@@ -1,17 +1,10 @@
|
|||||||
name: Bump version
|
name: Bump version
|
||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
bump-type:
|
|
||||||
description: 'Bump type'
|
|
||||||
required: true
|
|
||||||
default: 'patch'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- major
|
|
||||||
- minor
|
|
||||||
- patch
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -19,20 +12,59 @@ 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: show structure
|
||||||
if: steps.bump.outputs.bumped == 'true'
|
run: ls -la
|
||||||
|
|
||||||
|
- name: Generate CHANGELOG.md
|
||||||
|
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 }}
|
||||||
@@ -59,24 +59,15 @@ jobs:
|
|||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: ${{ github.ref }}
|
branch: ${{ github.ref }}
|
||||||
|
|
||||||
- name: "Build Changelog"
|
- name: Build Changelog
|
||||||
id: build_changelog
|
id: build_changelog
|
||||||
uses: mikepenz/release-changelog-builder-action@v5.0.0
|
uses: https://github.com/mikepenz/release-changelog-builder-action@v5
|
||||||
|
with:
|
||||||
|
platform: "gitea"
|
||||||
|
baseURL: "http://gitea:3000"
|
||||||
|
configuration: ".gitea/changelog-config.json"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- name: Add release notes to environment
|
|
||||||
id: add_release_notes
|
|
||||||
run: |
|
|
||||||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.event.inputs.release_notes }}" >> $GITHUB_ENV
|
|
||||||
echo "EOF" >> $GITHUB_ENV
|
|
||||||
- name: Get the changelog
|
|
||||||
run: |
|
|
||||||
cat << "EOF"
|
|
||||||
${{ steps.changelog.outputs.changelog }}
|
|
||||||
EOF
|
|
||||||
echo ${{ steps.changelog.outputs.changelog }}
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
|
|||||||
Reference in New Issue
Block a user