@@ -1004,25 +1004,25 @@ pipeline {
10041004 environment name : ' EXIT_STATUS' , value : ' '
10051005 }
10061006 steps {
1007- echo " Auto-generating release notes"
1008- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
1009- echo "Existing tag points to current commit, suggesting no new LS changes"
1010- AUTO_RELEASE_NOTES="No changes"
1011- else
1012- 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 \
1013- -d '{"tag_name":"'${META_TAG}'",\
1014- "target_commitish": "develop"}' \
1015- | jq -r '.body' | sed 's|## What.s Changed||')
1016- fi'''
1017- echo " Pushing New tag for current commit ${ META_TAG} "
1018- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1019- -d '{"tag":"'${META_TAG}'",\
1020- "object": "'${COMMIT_SHA}'",\
1021- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to develop",\
1022- "type": "commit",\
1023- "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
1024- echo " Pushing New release for Tag"
10251007 sh ''' #! /bin/bash
1008+ echo "Auto-generating release notes"
1009+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1010+ echo "Existing tag points to current commit, suggesting no new LS changes"
1011+ AUTO_RELEASE_NOTES="No changes"
1012+ else
1013+ 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 \
1014+ -d '{"tag_name":"'${META_TAG}'",\
1015+ "target_commitish": "develop"}' \
1016+ | jq -r '.body' | sed 's|## What.s Changed||')
1017+ fi
1018+ echo "Pushing New tag for current commit ${META_TAG}"
1019+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1020+ -d '{"tag":"'${META_TAG}'",\
1021+ "object": "'${COMMIT_SHA}'",\
1022+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to develop",\
1023+ "type": "commit",\
1024+ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
1025+ echo "Pushing New release for Tag"
10261026 echo "Data change at JSON endpoint ${JSON_URL}" > releasebody.json
10271027 jq -n \
10281028 --arg tag_name "$META_TAG" \
@@ -1037,7 +1037,8 @@ pipeline {
10371037 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
10381038 "draft": false,
10391039 "prerelease": true }' > releasebody.json.done
1040- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1040+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1041+ '''
10411042 }
10421043 }
10431044 // Add protection to the release branch
0 commit comments