From 7a5e4b906cf22a0c335c72d9be9dc1164d27b29d Mon Sep 17 00:00:00 2001 From: Jan Larwig Date: Sat, 23 Sep 2023 08:54:48 +0000 Subject: [PATCH] add changelog section extraction for github release notes --- .github/workflows/publish-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b1cc0f7323..95b6760a46 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -73,13 +73,17 @@ jobs: # Get version from tag version=$(git describe --tags --abbrev=0) + # Extract CHANGELOG + numericVersion="${version#v}" + notes=$(sed -E "/^# (v|V)$numericVersion$/,/^# (v|V)/!d;//d" CHANGELOG.md) + # Publish release tag git push origin "${version}" # Create github release gh release create "${version}" \ --title "${version}" \ - --generate-notes \ + --notes "${notes}" \ --prerelease # Upload artifacts