added release notes automation
This commit is contained in:
@@ -30,17 +30,14 @@ jobs:
|
||||
id: release_notes
|
||||
run: |
|
||||
VERSION=$(cat version.txt)
|
||||
# Extract release notes for this version
|
||||
# Find the section for this version and extract until the next version section
|
||||
RELEASE_NOTES=$(awk -v ver="$VERSION" '
|
||||
/^## \[/ {
|
||||
if (found) exit
|
||||
if ($0 ~ "\\[" ver "\\]") found=1
|
||||
else if (found) exit
|
||||
if (index($0, "[" ver "]") > 0) found = 1
|
||||
next
|
||||
}
|
||||
found && NF { print }
|
||||
' RELEASENOTES.md | sed -e :a -e '/^$/N;$!ba' -e 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
found { print }
|
||||
' RELEASENOTES.md)
|
||||
|
||||
# Escape newlines for GitHub output
|
||||
RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
|
||||
|
||||
Reference in New Issue
Block a user