CICD: Improve the Release Note Generation

Use .md suffix to get the files displayed as markdown.
Ignore generated artefacts.

Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
Michael Keller 2024-01-10 09:11:51 +13:00 committed by Dirk Hohndel
parent 249b82f6dc
commit 6c8afabedf
5 changed files with 6 additions and 5 deletions

8
scripts/create-releasenotes.sh Normal file → Executable file
View file

@ -6,7 +6,7 @@
json=$(gh pr list -s merged -S "$1" --json title,number,url)
cp gh_release_notes_top gh_release_notes
cp gh_release_notes_top.md gh_release_notes.md
if [[ $json != "[]" ]]; then
(
echo -n 'This build was created by [merging pull request '
@ -16,11 +16,11 @@ if [[ $json != "[]" ]]; then
echo -n ')]('
echo -n $json | jq -j '.[0]|{url}|join(" ")'
echo ' )'
) >> gh_release_notes
) >> gh_release_notes.md
else
(
echo "This build was created by directly pushing to the Subsurface repo."
echo "The latest commit was [$(git log --pretty=format:"%an: '%s'" -n1)](https://github.com/subsurface/subsurface/commit/$1 )"
) >> gh_release_notes
) >> gh_release_notes.md
fi
cat gh_release_notes_bottom >> gh_release_notes
cat gh_release_notes_bottom.md >> gh_release_notes.md