From 5d8e00c3967a40df3a3fa9ebe7553889724d7c59 Mon Sep 17 00:00:00 2001 From: Ralf Kirchner Date: Thu, 29 May 2025 11:53:51 +0200 Subject: [PATCH] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 48 +++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 096dd0c..4f0b3a9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,39 +1,47 @@ -name: Release +name: Create Release on: push: tags: - - 'v*' # Reagiere auf Tags wie v1.0.0 + - 'v*' # Startet nur bei Tags wie v1.0.0 jobs: release: runs-on: ubuntu-latest + steps: - - name: Checkout repository + - name: Enable debug output + run: | + set -x + + - name: Checkout source uses: actions/checkout@v3 - - name: Set up Go (required for git-chglog) - uses: actions/setup-go@v4 - with: - go-version: '1.21' - - - name: Install git-chglog - run: | - curl -sSL https://github.com/git-chglog/git-chglog/releases/latest/download/git-chglog_linux_amd64 -o git-chglog - chmod +x git-chglog - sudo mv git-chglog /usr/local/bin/ - - - name: Generate CHANGELOG.md for current tag - run: | - VERSION=$(git describe --tags --abbrev=0) - git-chglog -o CHANGELOG.md "$VERSION" - - name: Extract repository info run: | echo "REPO=${GITEA_REPOSITORY#*/}" >> $GITEA_ENV echo "OWNER=${GITEA_REPOSITORY%/*}" >> $GITEA_ENV - - name: Create Gitea release + - name: Install git-chglog + 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: Show git-chglog version + run: git-chglog --version + + - 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 uses: https://gitea.com/actions/release-action@main with: api_key: ${{ secrets.TOKEN }}