From 96a3c9914f7e9754c6d1a2210d31eb5758fc1dca Mon Sep 17 00:00:00 2001 From: Ruben Nijveld Date: Fri, 29 Mar 2024 14:54:59 +0100 Subject: [PATCH] Check header for release notes --- .github/workflows/packaging.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 1a3fbcf6b..53ec0b259 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -114,7 +114,6 @@ jobs: - name: Ensure there is not already a released tag with a non-draft release run: test "$(gh release view "v$release_version" --json isDraft --jq .isDraft 2>/dev/null || echo "true")" == "true" - # TODO: verify the actual changelog header - name: Verify that the changelog top most entry concerns this release run: | release_notes="$(awk '/^## / && !found { found=1; print; next } /^## / && found { exit } found { print }' CHANGELOG.md)" @@ -122,7 +121,8 @@ jobs: release_notes_body="$(echo "$release_notes" | tail +2)" release_notes_body="${release_notes_body#"${release_notes_body%%[![:space:]]*}"}" release_notes_body="${release_notes_body%"${release_notes_body##*[![:space:]]}"}" - + release_notes_version="$(echo "$release_notes_header" | cut -d' ' -f2 | sed 's/[][]//g')" + test "$release_notes_version" == "${{ env.release_version }}" { echo "release_notes_body<