From 4b52d322de9dc4958007a55ddf1749d47066d164 Mon Sep 17 00:00:00 2001 From: dutchie031 Date: Sun, 26 Jul 2026 17:50:31 +0200 Subject: [PATCH] added release notes automation --- .gitea/workflows/release.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 27c9be1..c78d257 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -30,17 +30,14 @@ jobs: id: release_notes run: | VERSION=$(cat version.txt) - # Extract release notes for this version - # Find the section for this version and extract until the next version section RELEASE_NOTES=$(awk -v ver="$VERSION" ' /^## \[/ { if (found) exit - if ($0 ~ "\\[" ver "\\]") found=1 - else if (found) exit + if (index($0, "[" ver "]") > 0) found = 1 next } - found && NF { print } - ' RELEASENOTES.md | sed -e :a -e '/^$/N;$!ba' -e 's/^[[:space:]]*//;s/[[:space:]]*$//') + found { print } + ' RELEASENOTES.md) # Escape newlines for GitHub output RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"