Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b4a1f798bd
|
|||
|
e4be7f6516
|
|||
|
27118d5826
|
|||
| 3ea9d963b0 | |||
|
e945d38418
|
|||
|
013c0cdd88
|
|||
|
04e175dfb8
|
|||
| 30e3f59a11 | |||
|
2c25474f2e
|
|||
|
874a37f269
|
|||
|
ae9ccbf83e
|
|||
| a3ac272787 | |||
|
f3a00ccb1c
|
|||
|
87e2078b3c
|
|||
|
da8d686357
|
|||
| 4ea1898232 | |||
|
5b2472a391
|
|||
|
6505bf3bd5
|
|||
|
b02c906a79
|
|||
| 0922ad361e | |||
|
6a5b1d13a8
|
|||
|
9d12dee06b
|
|||
|
4ea8a21ad4
|
|||
| 5d87f69603 |
@@ -1,4 +1,4 @@
|
||||
{{ range .Versions }}
|
||||
{{ with index .Versions 0 }}
|
||||
<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 }})
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Create Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Nur bei Tags wie v1.0.0
|
||||
- 'v*' # Nur bei Tags wie v1.0.0, v2.0.0
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -13,8 +13,11 @@ jobs:
|
||||
- name: Enable debug output
|
||||
run: set -x
|
||||
|
||||
- name: Checkout source
|
||||
- name: Checkout full history including tags
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Show environment variables for debugging
|
||||
run: |
|
||||
@@ -25,11 +28,8 @@ jobs:
|
||||
id: repo-info
|
||||
run: |
|
||||
REMOTE_URL=$(git config --get remote.origin.url)
|
||||
echo "Remote URL: $REMOTE_URL"
|
||||
|
||||
OWNER=$(echo "$REMOTE_URL" | sed -E 's#.*/([^/]+)/([^/]+)(\.git)?#\1#')
|
||||
REPO=$(echo "$REMOTE_URL" | sed -E 's#.*/([^/]+)/([^/]+)(\.git)?#\2#')
|
||||
|
||||
echo "OWNER=$OWNER" >> $GITHUB_ENV
|
||||
echo "REPO=$REPO" >> $GITHUB_ENV
|
||||
|
||||
@@ -41,24 +41,24 @@ jobs:
|
||||
chmod +x git-chglog
|
||||
sudo mv git-chglog /usr/local/bin/
|
||||
|
||||
- name: Show git-chglog version
|
||||
run: git-chglog --version
|
||||
|
||||
- name: Determine previous tag
|
||||
- name: Determine current and previous tag
|
||||
id: tags
|
||||
run: |
|
||||
CURRENT_TAG="${GITHUB_REF##*/}"
|
||||
PREVIOUS_TAG=$(git tag --sort=-creatordate | grep -v "$CURRENT_TAG" | tail -n1 || true)
|
||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 "${CURRENT_TAG}^" 2>/dev/null || true)
|
||||
|
||||
echo "CURRENT_TAG=$CURRENT_TAG"
|
||||
echo "PREVIOUS_TAG=$PREVIOUS_TAG"
|
||||
|
||||
echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV
|
||||
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate CHANGELOGs
|
||||
- name: Generate CHANGELOG.md
|
||||
run: |
|
||||
# Vollständiger Changelog
|
||||
# Optional: kompletter Changelog (nicht für Release-Body)
|
||||
git-chglog -o CHANGELOG.md
|
||||
|
||||
# Nur aktueller Abschnitt
|
||||
# Nur der relevante Abschnitt zwischen Tags
|
||||
if [ -n "$PREVIOUS_TAG" ]; then
|
||||
git-chglog "$PREVIOUS_TAG..$CURRENT_TAG" > RELEASE_BODY.md
|
||||
else
|
||||
@@ -68,13 +68,14 @@ jobs:
|
||||
echo "Release changelog content:"
|
||||
cat RELEASE_BODY.md
|
||||
|
||||
- name: Create Gitea Release via API (Markdown-safe)
|
||||
- name: Create Gitea Release via API
|
||||
env:
|
||||
TOKEN: ${{ secrets.TOKEN }}
|
||||
OWNER: ${{ env.OWNER }}
|
||||
REPO: ${{ env.REPO }}
|
||||
CURRENT_TAG: ${{ env.CURRENT_TAG }}
|
||||
run: |
|
||||
# Base64-encode und sicher escapen für JSON
|
||||
BODY=$(base64 -w0 RELEASE_BODY.md)
|
||||
DECODED_BODY=$(echo "$BODY" | base64 -d | jq -Rs .)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user