Compare commits

..

19 Commits

Author SHA1 Message Date
6a5b1d13a8 feat(3): Auto-Update 3: Zufallsstring J5seL5Zg
All checks were successful
Create Release / release (push) Successful in 8s
2025-05-29 13:57:29 +02:00
9d12dee06b feat(2): Auto-Update 2: Zufallsstring XXFRCMIz 2025-05-29 13:57:28 +02:00
4ea8a21ad4 feat(1): Auto-Update 1: Zufallsstring e3RCS218 2025-05-29 13:57:22 +02:00
5d87f69603 .gitea/workflows/release.yml aktualisiert 2025-05-29 13:57:09 +02:00
0fd17eaddb feat(3): Auto-Update 3: Zufallsstring ikA2H9a3
All checks were successful
Create Release / release (push) Successful in 8s
2025-05-29 13:47:24 +02:00
dbbef44530 feat(2): Auto-Update 2: Zufallsstring VUKfUEJZ 2025-05-29 13:47:23 +02:00
ded9df64b1 feat(1): Auto-Update 1: Zufallsstring kLtteV0j 2025-05-29 13:47:17 +02:00
ce1d145b49 .chglog/CHANGELOG.tpl.md aktualisiert 2025-05-29 13:47:05 +02:00
108afd6b19 feat(3): Auto-Update 3: Zufallsstring x3Gpbeek
All checks were successful
Create Release / release (push) Successful in 9s
2025-05-29 13:41:55 +02:00
c65a5e8c15 feat(2): Auto-Update 2: Zufallsstring 7eNev7oo 2025-05-29 13:41:55 +02:00
ab22aaacb3 feat(1): Auto-Update 1: Zufallsstring tR0o43E3 2025-05-29 13:41:54 +02:00
0ebe97a116 fix(autopost): Script angepasst 2025-05-29 13:41:34 +02:00
87b5548690 feat(autopost): Script für autmatisierung 2025-05-29 13:40:03 +02:00
31c1e92935 feat(test8): test 8
All checks were successful
Create Release / release (push) Successful in 8s
2025-05-29 12:58:35 +02:00
d771a60b9e Merge branch 'main' of https://dev.ksite.de/ralf.kirchner/demo 2025-05-29 12:56:59 +02:00
943015b0a1 feat(test6): test 6 2025-05-29 12:54:47 +02:00
c59a710352 .gitea/workflows/release.yml aktualisiert 2025-05-29 12:53:48 +02:00
94eb4f63cb feat(test5): test
All checks were successful
Create Release / release (push) Successful in 7s
2025-05-29 12:46:00 +02:00
2ddb1fd386 feat(test4): test 4 2025-05-29 12:44:50 +02:00
4 changed files with 115 additions and 43 deletions

View File

@ -1,42 +1,38 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## BlueMastoFeed {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ if .CommitGroups }}
### Changes
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .CommitGroups }}
#### {{ .Title }}
{{ range .Commits }}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end }}
{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ if .MergeCommits }}
### Pull Requests
{{ range .MergeCommits }}
- {{ .Header }}
{{ end }}
{{ end }}
{{ if .RevertCommits }}
{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits }}
- {{ .Revert.Header }}
{{ range .RevertCommits -}}
* {{ .Revert.Header }}
{{ end }}
{{ end -}}
{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
* {{ .Header }}
{{ end }}
{{ end -}}
{{ if .NoteGroups }}
### Notes
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .NoteGroups }}
#### {{ .Title }}
{{ range .Notes }}
- {{ .Body }}
{{ end }}
{{ end }}
{{ end }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

View File

@ -11,8 +11,7 @@ jobs:
steps:
- name: Enable debug output
run: |
set -x
run: set -x
- name: Checkout source
uses: actions/checkout@v3
@ -45,33 +44,51 @@ jobs:
- name: Show git-chglog version
run: git-chglog --version
- name: Generate CHANGELOG.md for current tag
- name: Determine previous tag
id: tags
run: |
TAG=${GITHUB_REF##*/} # z.B. v1.0.0
echo "Generating changelog for tag: $TAG"
git-chglog -o CHANGELOG.md "$TAG"
echo "Changelog generated:"
cat CHANGELOG.md
CURRENT_TAG="${GITHUB_REF##*/}"
PREVIOUS_TAG=$(git tag --sort=-creatordate | grep -v "$CURRENT_TAG" | tail -n1 || true)
echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
echo "Current tag: $CURRENT_TAG"
echo "Previous tag: $PREVIOUS_TAG"
- name: Generate CHANGELOGs
run: |
# Vollständiger Changelog
git-chglog -o CHANGELOG.md
# Nur aktueller Abschnitt
if [ -n "$PREVIOUS_TAG" ]; then
git-chglog "$PREVIOUS_TAG..$CURRENT_TAG" > RELEASE_BODY.md
else
git-chglog "$CURRENT_TAG" > RELEASE_BODY.md
fi
echo "Release changelog content:"
cat RELEASE_BODY.md
- name: Create Gitea Release via API (Markdown-safe)
env:
TOKEN: ${{ secrets.TOKEN }}
OWNER: ${{ env.OWNER }}
REPO: ${{ env.REPO }}
CURRENT_TAG: ${{ env.CURRENT_TAG }}
run: |
TAG=${GITHUB_REF##*/}
BODY=$(base64 -w0 CHANGELOG.md)
BODY=$(base64 -w0 RELEASE_BODY.md)
DECODED_BODY=$(echo "$BODY" | base64 -d | jq -Rs .)
echo "Creating release for tag $TAG"
echo "Creating release for tag $CURRENT_TAG"
curl -X POST "https://dev.ksite.de/api/v1/repos/${OWNER}/${REPO}/releases" \
curl -s -X POST "https://dev.ksite.de/api/v1/repos/${OWNER}/${REPO}/releases" \
-H "Content-Type: application/json" \
-H "Authorization: token $TOKEN" \
-d @- <<EOF
{
"tag_name": "${TAG}",
"name": "${TAG}",
"tag_name": "${CURRENT_TAG}",
"name": "${CURRENT_TAG}",
"body": ${DECODED_BODY}
}
EOF

View File

@ -4,5 +4,23 @@
Das ist ein Test
Test 01
test 03
Test 03
Test 04
Test 05
Test 06
Test 07
dLlIj2EY
tR0o43E3
7eNev7oo
x3Gpbeek
kLtteV0j
VUKfUEJZ
ikA2H9a3
e3RCS218
XXFRCMIz
J5seL5Zg

41
autopost.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/bash
set -e
# Sicherstellen, dass wir uns in einem Git-Repo befinden
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
echo "Dieses Skript muss in einem Git-Repository ausgeführt werden."
exit 1
fi
README_FILE="README.md"
# Aktuelles höchstes semver-Tag im Format vX.Y.Z finden
latest_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
if [[ $latest_tag =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
major=${BASH_REMATCH[1]}
# Version erhöhen (nur Major erhöhen, Minor & Patch = 0)
new_major=$((major + 1))
else
new_major=1
fi
new_tag="v${new_major}.0.0"
# Drei zufällige Änderungen durchführen
for i in {1..3}; do
random_string=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8)
echo "Zufallsstring $i: $random_string"
echo "$random_string" >> "$README_FILE"
git add "$README_FILE"
git commit -m "feat($i): Auto-Update $i: Zufallsstring $random_string"
git push
done
# Tag erstellen und pushen
git tag "$new_tag"
git push origin "$new_tag"
echo "Fertig! Neues semver-Tag erstellt: $new_tag"