ci(release): ajouter la liste des commits après les notes CHANGELOG dans la release
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9ac814fda4
commit
64671fc8b2
1 changed files with 22 additions and 1 deletions
|
|
@ -84,11 +84,32 @@ jobs:
|
|||
;;
|
||||
esac
|
||||
|
||||
# Build commit log since previous stable tag
|
||||
previous_stable_tag=""
|
||||
if previous_stable_tag="$(
|
||||
git describe --tags --abbrev=0 \
|
||||
--exclude '*-rc*' \
|
||||
--exclude '*-beta*' \
|
||||
--exclude '*-alpha*' \
|
||||
"${current_tag}^" 2>/dev/null
|
||||
)"; then
|
||||
range="${previous_stable_tag}..${current_tag}"
|
||||
else
|
||||
range="${current_tag}"
|
||||
fi
|
||||
|
||||
{
|
||||
cat release_notes.md
|
||||
printf '\n\n## Commits\n\n'
|
||||
git log --reverse --pretty=format:'- %h %s' "${range}"
|
||||
printf '\n'
|
||||
} > release_body.md
|
||||
|
||||
json_escape() {
|
||||
sed ':a;N;$!ba;s/\\/\\\\/g;s/"/\\"/g;s/\t/\\t/g;s/\r//g;s/\n/\\n/g'
|
||||
}
|
||||
|
||||
body="$(json_escape < release_notes.md)"
|
||||
body="$(json_escape < release_body.md)"
|
||||
payload="$(printf '{"tag_name":"%s","name":"%s","body":"%s","draft":false,"prerelease":%s}' \
|
||||
"${current_tag}" \
|
||||
"${current_tag}" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue