Skip to content

Commit c25bcdf

Browse files
committed
use github generated release notes for LS changes
1 parent 5d707c5 commit c25bcdf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ansible/roles/repository/templates/Jenkinsfile.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,10 @@ pipeline {
13121312
environment name: 'EXIT_STATUS', value: ''
13131313
}
13141314
steps {
1315+
echo "Auto-generating release notes"
1316+
sh '''AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
1317+
-d '{"tag_name":"'${META_TAG}'",\
1318+
"target_commitish": "{{ ls_branch }}"}' | jq -r '.body') '''
13151319
echo "Pushing New tag for current commit ${META_TAG}"
13161320
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
13171321
-d '{"tag":"'${META_TAG}'",\
@@ -1350,7 +1354,7 @@ pipeline {
13501354
echo '{"tag_name":"'${META_TAG}'",\
13511355
"target_commitish": "{{ ls_branch }}",\
13521356
"name": "'${META_TAG}'",\
1353-
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
1357+
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${AUTO_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
13541358
printf '","draft": false,"prerelease": {% if release_type == "stable" %}false{% elif release_type == "prerelease" %}true{% endif %}}' >> releasebody.json
13551359
paste -d'\\0' start releasebody.json > releasebody.json.done
13561360
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

0 commit comments

Comments
 (0)