Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5c983986bd
|
|||
|
e466a8eada
|
|||
|
2ee3630392
|
|||
|
d1a0746b3e
|
|||
| 9fbf7681ed | |||
|
387462cfc9
|
|||
|
|
8e35f02191 | ||
|
0f35839fb4
|
|||
|
|
a055276849 | ||
|
|
ce670c5539 | ||
|
7631ed6e7c
|
|||
|
cc5dc6141c
|
@@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.1.15"
|
||||
current_version = "0.1.18"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
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
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump-type:
|
||||
description: 'Bump type'
|
||||
required: true
|
||||
default: 'patch'
|
||||
type: choice
|
||||
options:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,20 +12,56 @@ 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: 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
|
||||
@@ -57,7 +58,13 @@ jobs:
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
|
||||
- name: "Build Changelog"
|
||||
id: build_changelog
|
||||
uses: mikepenz/release-changelog-builder-action@v5.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Add release notes to environment
|
||||
id: add_release_notes
|
||||
run: |
|
||||
@@ -79,7 +86,7 @@ jobs:
|
||||
with:
|
||||
tag_name: ${{ 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
|
||||
|
||||
Reference in New Issue
Block a user