Update release.yml

This commit is contained in:
2026-02-21 16:19:44 +08:00
parent 468491b5b1
commit ff12ca2758

View File

@@ -22,9 +22,9 @@ jobs:
notes_file=".github/release-notes.md"
if grep -q "^## \\[${tag}\\]" CHANGELOG.md; then
awk -v ver="$tag" '
$0 ~ "^## \\["ver"\\]" {in=1; next}
in && $0 ~ "^## \\[" {exit}
in {print}
$0 ~ "^## \\[" ver "\\]" {found=1; next}
found && $0 ~ "^## \\[" {exit}
found {print}
' CHANGELOG.md | sed -e '${/^$/d;}' > "$notes_file"
else
echo "No CHANGELOG section for $tag." > "$notes_file"