@@ -953,25 +953,25 @@ pipeline {
953953 environment name : ' EXIT_STATUS' , value : ' '
954954 }
955955 steps {
956- echo " Auto-generating release notes"
957- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
958- echo "Existing tag points to current commit, suggesting no new LS changes"
959- AUTO_RELEASE_NOTES="No changes"
960- else
961- 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 \
962- -d '{"tag_name":"'${META_TAG}'",\
963- "target_commitish": "master"}' \
964- | jq -r '.body' | sed 's|## What.s Changed||')
965- fi'''
966- echo " Pushing New tag for current commit ${ META_TAG} "
967- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
968- -d '{"tag":"'${META_TAG}'",\
969- "object": "'${COMMIT_SHA}'",\
970- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
971- "type": "commit",\
972- "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
973- echo " Pushing New release for Tag"
974956 sh ''' #! /bin/bash
957+ echo "Auto-generating release notes"
958+ if [ "$(git tag --points-at HEAD)" != "" ]; then
959+ echo "Existing tag points to current commit, suggesting no new LS changes"
960+ AUTO_RELEASE_NOTES="No changes"
961+ else
962+ 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 \
963+ -d '{"tag_name":"'${META_TAG}'",\
964+ "target_commitish": "master"}' \
965+ | jq -r '.body' | sed 's|## What.s Changed||')
966+ fi
967+ echo "Pushing New tag for current commit ${META_TAG}"
968+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
969+ -d '{"tag":"'${META_TAG}'",\
970+ "object": "'${COMMIT_SHA}'",\
971+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
972+ "type": "commit",\
973+ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
974+ echo "Pushing New release for Tag"
975975 echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
976976 jq -n \
977977 --arg tag_name "$META_TAG" \
@@ -986,7 +986,8 @@ pipeline {
986986 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
987987 "draft": false,
988988 "prerelease": false }' > releasebody.json.done
989- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
989+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
990+ '''
990991 }
991992 }
992993 // Add protection to the release branch
0 commit comments