Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c130ac1d0 | ||
|
|
721e817b20 | ||
|
4a51f0c8e1
|
|||
|
bacdf95171
|
|||
|
|
b9143544c4 | ||
|
4e59dfad54
|
|||
|
a0d0535044
|
|||
|
ea16d817e1
|
|||
|
9e2621cd60
|
|||
|
655b6c0df5
|
|||
|
605dc750e7
|
|||
|
78faddf56e
|
|||
| 2686d822cd | |||
|
a121e59f47
|
|||
|
|
bdc46d7f37 | ||
|
|
4259f49d94 | ||
|
95e2cdcdce
|
|||
|
|
55d0cb50e6 | ||
|
3424805d4e
|
|||
|
|
5c0fcbdb66 | ||
|
f35e19d44d
|
|||
|
|
ef54d663d2 | ||
|
2ab0dcd60b
|
|||
|
|
9a2b6eeafc | ||
|
4c6d4a7c6f
|
|||
| b3decbcd05 | |||
| 2aed04e150 | |||
|
5c983986bd
|
|||
|
e466a8eada
|
|||
|
2ee3630392
|
|||
|
d1a0746b3e
|
|||
| 9fbf7681ed | |||
|
387462cfc9
|
|||
|
|
8e35f02191 | ||
|
0f35839fb4
|
|||
|
|
a055276849 | ||
|
|
ce670c5539 | ||
|
7631ed6e7c
|
|||
|
cc5dc6141c
|
|||
|
|
a960641000 | ||
|
d8139a5193
|
@@ -1,22 +0,0 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.1.14"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
search = "{current_version}"
|
||||
replace = "{new_version}"
|
||||
regex = false
|
||||
ignore_missing_version = false
|
||||
ignore_missing_files = false
|
||||
tag = true
|
||||
sign_tags = false
|
||||
tag_name = "v{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
allow_dirty = false
|
||||
commit = true
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
commit_args = ""
|
||||
setup_hooks = []
|
||||
pre_commit_hooks = []
|
||||
post_commit_hooks = []
|
||||
[[tool.bumpversion.files]]
|
||||
filename = ".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
|
||||
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump-type:
|
||||
description: 'Bump type'
|
||||
required: true
|
||||
default: 'patch'
|
||||
type: choice
|
||||
options:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,20 +12,59 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set Git identity
|
||||
- name: Setup git-chglog
|
||||
run: |
|
||||
git config user.name "Gitea CI"
|
||||
git config user.email "ci@git.theprivateserver.de"
|
||||
- name: Bump version
|
||||
id: bump
|
||||
uses: callowayproject/bump-my-version@master
|
||||
env:
|
||||
BUMPVERSION_TAG: "true"
|
||||
with:
|
||||
args: ${{ inputs.bump-type }}
|
||||
github-token: ${{ secrets.TOKEN }}
|
||||
CHGLOG_VERSION="0.15.4"
|
||||
curl -o git-chglog -L "https://github.com/git-chglog/git-chglog/releases/download/${CHGLOG_VERSION}/git-chglog_linux_amd64"
|
||||
chmod +x git-chglog
|
||||
|
||||
- name: Check
|
||||
if: steps.bump.outputs.bumped == 'true'
|
||||
- name: show structure
|
||||
run: ls -la
|
||||
|
||||
- name: Generate CHANGELOG.md
|
||||
id: generate
|
||||
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 }}
|
||||
@@ -24,6 +24,7 @@ on:
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: "contains(github.event.head_commit.message, 'release') || github.event_name == 'workflow_dispatch'"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -36,7 +37,7 @@ jobs:
|
||||
python-version-file: "pyproject.toml"
|
||||
|
||||
- name: Install the project
|
||||
run: uv sync --locked --all-extras --dev
|
||||
run: uv sync --all-extras --dev
|
||||
- name: Set Git identity
|
||||
run: |
|
||||
git config user.name "Gitea CI"
|
||||
@@ -51,39 +52,35 @@ jobs:
|
||||
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
- name: Check version
|
||||
run: echo ${{ env.VERSION }}
|
||||
run: |
|
||||
echo ${{ env.VERSION }}
|
||||
cat pyproject.toml
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
- 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 notes
|
||||
uses: johnyherangi/create-release-notes@main
|
||||
id: create-release-notes
|
||||
|
||||
- name: Build Changelog
|
||||
id: build_changelog
|
||||
uses: https://github.com/mikepenz/release-changelog-builder-action@v5
|
||||
with:
|
||||
mode: "COMMIT"
|
||||
platform: "gitea"
|
||||
baseURL: "http://gitea:3000"
|
||||
configuration: ".gitea/changelog-config.json"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
if: ${{ github.event.inputs.github_release == 'true' }}
|
||||
uses: softprops/action-gh-release@master
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
tag_name: v${{ env.VERSION }}
|
||||
release_name: Release ${{ env.VERSION }}
|
||||
body: ${{ steps.create-release-notes.outputs.release-notes }}
|
||||
body: ${{steps.build_changelog.outputs.changelog}}
|
||||
draft: false
|
||||
prerelease: false
|
||||
make_latest: true
|
||||
|
||||
1
hello.py
1
hello.py
@@ -10,3 +10,4 @@ def get_version():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
print("This script has been executed successfully.")
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "workflowbumptester"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
@@ -8,3 +8,25 @@ dependencies = [
|
||||
"bump-my-version>=1.1.3",
|
||||
"pyyaml>=6.0.2",
|
||||
]
|
||||
|
||||
[tool.bumpversion]
|
||||
current_version = "1.0.0"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
search = "{current_version}"
|
||||
replace = "{new_version}"
|
||||
regex = false
|
||||
ignore_missing_version = false
|
||||
ignore_missing_files = false
|
||||
tag = true
|
||||
sign_tags = false
|
||||
tag_name = "v{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
allow_dirty = true
|
||||
commit = true
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
moveable_tags = []
|
||||
commit_args = ""
|
||||
setup_hooks = []
|
||||
pre_commit_hooks = []
|
||||
post_commit_hooks = []
|
||||
|
||||
Reference in New Issue
Block a user