Merge pull request 'added release notes automation' (#2) from feature/automation into main
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -30,17 +30,14 @@ jobs:
|
|||||||
id: release_notes
|
id: release_notes
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(cat version.txt)
|
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" '
|
RELEASE_NOTES=$(awk -v ver="$VERSION" '
|
||||||
/^## \[/ {
|
/^## \[/ {
|
||||||
if (found) exit
|
if (found) exit
|
||||||
if ($0 ~ "\\[" ver "\\]") found=1
|
if (index($0, "[" ver "]") > 0) found = 1
|
||||||
else if (found) exit
|
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
found && NF { print }
|
found { print }
|
||||||
' RELEASENOTES.md | sed -e :a -e '/^$/N;$!ba' -e 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
' RELEASENOTES.md)
|
||||||
|
|
||||||
# Escape newlines for GitHub output
|
# Escape newlines for GitHub output
|
||||||
RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
|
RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
|
||||||
|
|||||||
Reference in New Issue
Block a user