Compare commits

...

10 Commits

Author SHA1 Message Date
f642eb5b06 .gitea/workflows/release.yml aktualisiert
All checks were successful
Create Release / release (push) Successful in 7s
2025-05-29 12:11:29 +02:00
75f0bc3fef .gitea/workflows/release.yml aktualisiert
Some checks failed
Create Release / release (push) Failing after 9s
2025-05-29 12:10:08 +02:00
2cbfeaf6c1 .gitea/workflows/release.yml aktualisiert
All checks were successful
Create Release / release (push) Successful in 7s
2025-05-29 12:05:36 +02:00
22a2476194 .gitea/workflows/release.yml aktualisiert
All checks were successful
Create Release / release (push) Successful in 8s
2025-05-29 12:03:01 +02:00
342bb23a8a .gitea/workflows/release.yml aktualisiert
Some checks failed
Create Release / release (push) Failing after 8s
2025-05-29 11:57:38 +02:00
5d8e00c396 .gitea/workflows/release.yml aktualisiert
Some checks failed
Create Release / release (push) Failing after 10s
2025-05-29 11:53:51 +02:00
6d3d8da80c .gitea/workflows/release.yml aktualisiert
Some checks failed
Release / release (push) Failing after 1m21s
2025-05-29 11:48:29 +02:00
6b0c286749 feat(2): test1 hinzugefügt
All checks were successful
Build Changelog and Release / release (push) Successful in 7s
2025-05-29 11:18:09 +02:00
e8196f2e02 feat(1): test1 hinzugefügt 2025-05-29 11:17:31 +02:00
2383627b93 .chglog/CHANGELOG.tpl.md aktualisiert
All checks were successful
Build Changelog and Release / release (push) Successful in 6s
2025-05-29 11:15:59 +02:00
3 changed files with 58 additions and 37 deletions

View File

@ -1,36 +1,37 @@
{{- range .Versions }}
{{ 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 .CommitGroups }}
{{ if .CommitGroups }}
### Changes
{{ range .CommitGroups }}
#### {{ .Title }}
{{ range .Commits }}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
[`{{ printf "%s" .Hash | slice 0 7 }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash }}) by @{{ .Author.Name }}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end }}
{{ end }}
{{- if .MergeCommits }}
{{ if .MergeCommits }}
### Pull Requests
{{ range .MergeCommits }}
- {{ .Header }}
[`{{ printf "%s" .Hash | slice 0 7 }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash }}) by @{{ .Author.Name }}
- {{ .Header }}
{{ end }}
{{ end }}
{{- if .RevertCommits }}
{{ if .RevertCommits }}
### Reverts
{{ range .RevertCommits }}
- {{ .Revert.Header }}
[`{{ printf "%s" .Hash | slice 0 7 }}`]({{ $.Info.RepositoryURL }}/commit/{{ .Hash }}) by @{{ .Author.Name }}
- {{ .Revert.Header }}
{{ end }}
{{ end }}
{{- if .NoteGroups }}
{{ if .NoteGroups }}
### Notes
{{ range .NoteGroups }}
#### {{ .Title }}
{{ range .Notes }}
@ -38,5 +39,4 @@
{{ end }}
{{ end }}
{{ end }}
{{ end }}

View File

@ -1,44 +1,62 @@
name: Build Changelog and Release
name: Create Release
on:
push:
tags:
- 'v*.*.*'
- 'v*' # Startet nur bei Tags wie v1.0.0
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Enable debug output
run: |
set -x
- name: Checkout source
uses: actions/checkout@v3
- name: Install git-chglog
- name: Extract repository info
run: |
curl -sSL https://github.com/git-chglog/git-chglog/releases/download/v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz | tar -xz
echo "REPO=${GITEA_REPOSITORY#*/}" >> $GITEA_ENV
echo "OWNER=${GITEA_REPOSITORY%/*}" >> $GITEA_ENV
- name: Install git-chglog (no Go needed)
run: |
GIT_CHGLOG_VERSION="0.15.1"
curl -sSL "https://github.com/git-chglog/git-chglog/releases/download/v${GIT_CHGLOG_VERSION}/git-chglog_${GIT_CHGLOG_VERSION}_linux_amd64.tar.gz" -o git-chglog.tar.gz
tar -xzf git-chglog.tar.gz
chmod +x git-chglog
sudo mv git-chglog /usr/local/bin/
- name: Generate changelog
run: |
git-chglog $(git describe --tags --abbrev=0) > RELEASE_NOTES.md
- name: Show git-chglog version
run: git-chglog --version
- name: Create Release on Gitea
- name: Generate CHANGELOG.md for current tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Generating changelog for tag: $TAG"
git-chglog -o CHANGELOG.md "$TAG"
echo "Changelog generated:"
cat CHANGELOG.md
- name: Create Gitea Release via API (no Go required)
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
TOKEN: ${{ secrets.TOKEN }}
GITEA_REPOSITORY: ${{ env.GITEA_REPOSITORY }}
run: |
TAG=$(git describe --tags)
REPO=${GITEA_REPOSITORY#*/}
OWNER=${GITEA_REPOSITORY%/*}
BODY=$(cat RELEASE_NOTES.md | jq -Rs .)
curl -X POST "https://dev.ksite.de/api/v1/repos/ralf.kirchner/demo/releases" \
-H "Authorization: token $GITEA_TOKEN" \
OWNER="${GITEA_REPOSITORY%%/*}"
REPO="${GITEA_REPOSITORY##*/}"
TAG=${GITHUB_REF##*/} # aktueller Tagname
echo "Owner: $OWNER, Repo: $REPO, Tag: $TAG"
curl -X POST "https://dev.ksite.de/api/v1/repos/${OWNER}/${REPO}/releases" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"$TAG\",
\"name\": \"$TAG\",
\"body\": $BODY,
\"draft\": false,
\"prerelease\": false
}"
-H "Authorization: token $TOKEN" \
-d @- <<EOF
{
"tag_name": "${TAG}",
"name": "${TAG}",
"body": "$(sed 's/"/\\"/g' CHANGELOG.md)"
}
EOF

View File

@ -0,0 +1,3 @@
1
2