From c28314d61b7409950f700afd4044b82d5c43a86f Mon Sep 17 00:00:00 2001 From: Oliver G Date: Mon, 7 Jul 2025 16:41:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Release-Workflow=20verbessert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0509c86..4cbd535 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,16 +24,22 @@ jobs: run: | VERSION=${GITHUB_REF#refs/tags/} echo "📌 Version: $VERSION" - CONTENT=$(awk "/## \[?$VERSION\]?/,/## \[/" CHANGELOG.md | sed '1d;$d') + + BODY=$(awk -v version="$VERSION" ' + BEGIN { found = 0 } + $0 ~ "## \\[v"version"\\]" { found = 1; next } + $0 ~ /^## \[v[0-9]+\.[0-9]+\.[0-9]+\]/ && found { exit } + found { print } + ' CHANGELOG.md) + echo "RELEASE_BODY<> $GITHUB_ENV - echo "$CONTENT" >> $GITHUB_ENV + echo "$BODY" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - - name: 🚀 GitHub Release erstellen + - name: 🚀 GitHub Release veröffentlichen uses: softprops/action-gh-release@v2 with: name: ${{ github.ref_name }} body: ${{ env.RELEASE_BODY }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -