@@ -1337,25 +1337,25 @@ pipeline {
13371337 environment name: 'EXIT_STATUS', value: ''
13381338 }
13391339 steps {
1340- echo "Auto-generating release notes"
1341- sh '''if [ "$(git tag --points-at HEAD)" != "" ]; then
1342- echo "Existing tag points to current commit, suggesting no new LS changes"
1343- AUTO_RELEASE_NOTES="No changes"
1344- else
1345- 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 \
1346- -d '{"tag_name":"'${META_TAG}'",\
1347- "target_commitish": "{{ ls_branch }}"}' \
1348- | jq -r '.body' | sed 's|## What.s Changed||')
1349- fi'''
1350- echo "Pushing New tag for current commit ${META_TAG}"
1351- sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1352- -d '{"tag":"'${META_TAG}'",\
1353- "object": "'${COMMIT_SHA}'",\
1354- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to {{ ls_branch }}",\
1355- "type": "commit",\
1356- "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
1357- echo "Pushing New release for Tag"
13581340 sh '''#! /bin/bash
1341+ echo "Auto-generating release notes"
1342+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1343+ echo "Existing tag points to current commit, suggesting no new LS changes"
1344+ AUTO_RELEASE_NOTES="No changes"
1345+ else
1346+ 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 \
1347+ -d '{"tag_name":"'${META_TAG}'",\
1348+ "target_commitish": "{{ ls_branch }}"}' \
1349+ | jq -r '.body' | sed 's|## What.s Changed||')
1350+ fi
1351+ echo "Pushing New tag for current commit ${META_TAG}"
1352+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1353+ -d '{"tag":"'${META_TAG}'",\
1354+ "object": "'${COMMIT_SHA}'",\
1355+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to {{ ls_branch }}",\
1356+ "type": "commit",\
1357+ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
1358+ echo "Pushing New release for Tag"
13591359{% if custom_version_command is defined %}
13601360 echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
13611361{% endif %}
@@ -1396,7 +1396,8 @@ pipeline {
13961396 "draft": false,
13971397 "prerelease": {% if release_type == "stable" %} false{% elif release_type == "prerelease" %} true{% endif %}
13981398 }' > releasebody.json.done
1399- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1399+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1400+ '''
14001401 }
14011402 }
14021403 // Add protection to the release branch
0 commit comments