@@ -1001,25 +1001,25 @@ pipeline {
10011001 environment name : ' EXIT_STATUS' , value : ' '
10021002 }
10031003 steps {
1004- echo " Auto-generating release notes"
1005- sh ''' if [ "$(git tag --points-at HEAD)" != "" ]; then
1006- echo "Existing tag points to current commit, suggesting no new LS changes"
1007- AUTO_RELEASE_NOTES="No changes"
1008- else
1009- 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 \
1010- -d '{"tag_name":"'${META_TAG}'",\
1011- "target_commitish": "beta"}' \
1012- | jq -r '.body' | sed 's|## What.s Changed||')
1013- fi'''
1014- echo " Pushing New tag for current commit ${ META_TAG} "
1015- sh ''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1016- -d '{"tag":"'${META_TAG}'",\
1017- "object": "'${COMMIT_SHA}'",\
1018- "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to beta",\
1019- "type": "commit",\
1020- "tagger": {"name": "LinuxServer-CI","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' ''' 1021- echo " Pushing New release for Tag"
10221004 sh ''' #! /bin/bash
1005+ echo "Auto-generating release notes"
1006+ if [ "$(git tag --points-at HEAD)" != "" ]; then
1007+ echo "Existing tag points to current commit, suggesting no new LS changes"
1008+ AUTO_RELEASE_NOTES="No changes"
1009+ else
1010+ 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 \
1011+ -d '{"tag_name":"'${META_TAG}'",\
1012+ "target_commitish": "beta"}' \
1013+ | jq -r '.body' | sed 's|## What.s Changed||')
1014+ fi
1015+ echo "Pushing New tag for current commit ${META_TAG}"
1016+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
1017+ -d '{"tag":"'${META_TAG}'",\
1018+ "object": "'${COMMIT_SHA}'",\
1019+ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to beta",\
1020+ "type": "commit",\
1021+ "tagger": {"name": "LinuxServer-CI","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' 1022+ echo "Pushing New release for Tag"
10231023 echo "Data change at JSON endpoint ${JSON_URL}" > releasebody.json
10241024 jq -n \
10251025 --arg tag_name "$META_TAG" \
@@ -1034,7 +1034,8 @@ pipeline {
10341034 "body": ("**CI Report:**\\ n\\ n" + $ci_url + "\\ n\\ n**LinuxServer Changes:**\\ n\\ n" + $ls_notes + "\\ n\\ n**Remote Changes:**\\ n\\ n" + $remote_notes),
10351035 "draft": false,
10361036 "prerelease": true }' > releasebody.json.done
1037- curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
1037+ curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done
1038+ '''
10381039 }
10391040 }
10401041 // Add protection to the release branch
0 commit comments