Skip to content

Commit

Permalink
Fix checking of heading in release notes - negate expression (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-dingemans committed Oct 13, 2023
1 parent dfefb6b commit cf1c400
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/publish-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf1c400

Please sign in to comment.