@@ -1015,25 +1015,25 @@ pipeline {
10151015 environment name : ' EXIT_STATUS' , value : ' '
10161016 }
10171017 steps {
1018- echo " Auto-generating release notes"
1019- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
1020- echo "Existing tag points to current commit, suggesting no new LS changes"
1021- AUTO_RELEASE_NOTES="No changes"
1022- else
1023- 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 \
1024- -d '{"tag_name":"'${META_TAG}'",\
1025- "target_commitish": "main"}' \
1026- | jq -r '.body' | sed 's|## What.s Changed||')
1027- fi'''
1028- echo " Pushing New tag for current commit ${ META_TAG} "
1029- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1030- -d '{"tag":"'${META_TAG}'",\
1031- "object": "'${COMMIT_SHA}'",\
1032- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
1033- "type": "commit",\
1034- "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
1035- echo " Pushing New release for Tag"
10361018 sh ''' #! /bin/bash
1019+ echo "Auto-generating release notes"
1020+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1021+ echo "Existing tag points to current commit, suggesting no new LS changes"
1022+ AUTO_RELEASE_NOTES="No changes"
1023+ else
1024+ 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 \
1025+ -d '{"tag_name":"'${META_TAG}'",\
1026+ "target_commitish": "main"}' \
1027+ | jq -r '.body' | sed 's|## What.s Changed||')
1028+ fi
1029+ echo "Pushing New tag for current commit ${META_TAG}"
1030+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1031+ -d '{"tag":"'${META_TAG}'",\
1032+ "object": "'${COMMIT_SHA}'",\
1033+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to main",\
1034+ "type": "commit",\
1035+ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
1036+ echo "Pushing New release for Tag"
10371037 echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
10381038 jq -n \
10391039 --arg tag_name "$META_TAG" \
@@ -1048,7 +1048,8 @@ pipeline {
10481048 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
10491049 "draft": false,
10501050 "prerelease": false }' > releasebody.json.done
1051- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1051+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1052+ '''
10521053 }
10531054 }
10541055 // Add protection to the release branch
0 commit comments