Skip to content

Commit

Permalink
Include folded text in the release changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Jul 24, 2024
1 parent 3f9c327 commit 437b460
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@ jobs:
- name: Get Latest Changelog Entry
id: get-changelog
run: |
changelog=$(awk '/^mx-snapshot/{i++} i==1' debian/changelog | grep '^[[:space:]]*\*')
changelog=$(awk '
BEGIN { changes = ""; release_found = 0; in_changes = 0 }
/^mx-snapshot/ {
if (release_found == 1) exit
release_found = 1
next
}
release_found == 1 && /^\s*\*/ {
in_changes = 1
}
release_found == 1 && in_changes == 1 {
if ($0 ~ /^\s*\*/) {
changes = changes $0 "\n"
} else if ($0 ~ /^\s+/) {
changes = changes $0 "\n"
} else {
exit
}
}
END { print changes }
' debian/changelog)
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down

0 comments on commit 437b460

Please sign in to comment.