From cf1c400b877139273b111b7167f0078b1f21c4c9 Mon Sep 17 00:00:00 2001 From: Paul Dingemans Date: Fri, 13 Oct 2023 13:54:02 +0200 Subject: [PATCH] Fix checking of heading in release notes - negate expression (#2309) --- .github/workflows/publish-release-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release-build.yml b/.github/workflows/publish-release-build.yml index 8f34e6d408..54930d7aa7 100644 --- a/.github/workflows/publish-release-build.yml +++ b/.github/workflows/publish-release-build.yml @@ -32,7 +32,8 @@ jobs: if: ${{ success() }} run: | FIRST_HEADING2=$(grep "^## " CHANGELOG.md | head -n 1) - if [[ "$FIRST_HEADING2" =~ ^##[[:space:]]\[[0-9]+\.[0-9]+\.[0-9]+\][[:space:]]-[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then + echo "First heading2 found: $FIRST_HEADING2" + if [[ ! "$FIRST_HEADING2" =~ ^##[[:space:]]\[[0-9]+\.[0-9]+\.[0-9]+\][[:space:]]-[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then echo "First heading at level 2 should match '## [X.Y.Z] - [YYYY-MM-DD]'" exit 1 fi