diff options
author | Joseph Donofry <rubberduckie3554@gmail.com> | 2023-02-28 12:04:55 -0500 |
---|---|---|
committer | Joseph Donofry <rubberduckie3554@gmail.com> | 2023-02-28 12:04:55 -0500 |
commit | 701058ef211ef457ef49149fea0a054883f621a4 (patch) | |
tree | 049a68e0c0aa4063c63ed10eb47f5f81c62676f4 /.ci | |
parent | Add more logging to CI script (diff) | |
download | nheko-701058ef211ef457ef49149fea0a054883f621a4.tar.xz |
Release notes are already quoted
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/update-github-release.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.ci/update-github-release.sh b/.ci/update-github-release.sh index ca7aab50..d51b4dd9 100755 --- a/.ci/update-github-release.sh +++ b/.ci/update-github-release.sh @@ -18,8 +18,9 @@ http_code=$(curl \ "https://api.github.com/repos/Nheko-Reborn/nheko/releases/tags/$CI_COMMIT_TAG") if [ "$http_code" = "404" ]; then - echo "Release does not exist... getting notes from CHANGELOG.md" + echo "Release does not exist... getting notes from CHANGELOG.md:" release_notes="$(perl -0777 -ne '/.*?(## .*?)\n(## |\Z)/s && print $1' CHANGELOG.md | jq -R -s '.')" + echo "$release_notes" echo "Creating new release for ${CI_COMMIT_TAG}" # Doing a 'fresh' release, not just updating the assets. @@ -29,7 +30,7 @@ if [ "$http_code" = "404" ]; then -H "Authorization: Bearer ${GITHUB_AUTH_TOKEN}"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/Nheko-Reborn/nheko/releases \ - -d "{\"tag_name\":\"${CI_COMMIT_TAG}\",\"target_commitish\":\"master\",\"name\":\"${CI_COMMIT_TAG}\",\"body\":\"${release_notes}\",\"draft\":true,\"prerelease\":true,\"generate_release_notes\":false}")" + -d "{\"tag_name\":\"${CI_COMMIT_TAG}\",\"target_commitish\":\"master\",\"name\":\"${CI_COMMIT_TAG}\",\"body\":${release_notes},\"draft\":true,\"prerelease\":true,\"generate_release_notes\":false}")" elif [ "$http_code" = "200" ]; then echo "Release already exists for ${CI_COMMIT_TAG}; Updating" # Updating a release (probably because of cirrus-ci or so) |