Skip to content

Commit 0e76a62

Browse files
committed
ci: improve changelog release notes extraction
1 parent e561e89 commit 0e76a62

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ jobs:
9696
run: |
9797
version="${{ steps.next_version.outputs.version }}"
9898
# Extract lines between the version header and the next ## header
99-
# Trim surrounding blank lines and normalize changelog issue refs from ([#123]) to (#123).
99+
# Trim surrounding blank lines and normalize changelog issue refs (e.g. ([#123]), ([#123] & [#456]), ([#123] and [#456]), ([#123], [#456] and [#789])) by stripping square brackets.
100100
awk "/^## \\[$version\\]/{found=1; next} found && /^## /{exit} found{print}" CHANGELOG.md \
101101
| sed '/./,$!d' | sed -e :a -e '/^\s*$/{$d;N;ba}' \
102-
| sed 's/(\[#\([0-9]\+\)\])/(#\1)/g' > release-notes.md
102+
| sed 's/\[#\([0-9]\+\)\]/#\1/g' > release-notes.md
103103
if [[ ! -s release-notes.md ]]; then
104104
echo "(No changelog entries found for $version)" > release-notes.md
105105
fi

0 commit comments

Comments
 (0)