diff options
author | Joseph Donofry <rubberduckie3554@gmail.com> | 2023-02-20 19:16:43 -0500 |
---|---|---|
committer | Joseph Donofry <rubberduckie3554@gmail.com> | 2023-02-20 19:16:43 -0500 |
commit | f3966bd1ce8b3417d4091a4f87e71078ced52007 (patch) | |
tree | b02bc61da27a3b2249aad11671cd905ef1f67f28 /.ci | |
parent | Use regex to match vX.Y.Z (diff) | |
download | nheko-f3966bd1ce8b3417d4091a4f87e71078ced52007.tar.xz |
Generate release notes from CHANGELOG.md
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/update-github-release.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.ci/update-github-release.sh b/.ci/update-github-release.sh index 49f5e18a..488063ca 100644 --- a/.ci/update-github-release.sh +++ b/.ci/update-github-release.sh @@ -18,6 +18,7 @@ http_code=$(curl \ "https://api.github.com/repos/Nheko-Reborn/nheko/releases/tags/$CI_COMMIT_TAG") if [ "$http_code" = "404" ]; then + release_notes="$(perl -0777 -ne '/.*?(## .*?)\n(## |\Z)/s && print $1' CHANGELOG.md | jq -R -s '.')" # Doing a 'fresh' release, not just updating the assets. release_json="$(curl \ -X POST \ @@ -25,7 +26,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\":\"Description of the release\",\"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 # Updating a release (probably because of cirrus-ci or so) release_json=$(curl \ |