Skip to content

Commit

Permalink
updates github release script
Browse files Browse the repository at this point in the history
  • Loading branch information
GentlemanHal committed Nov 8, 2022
1 parent f372ba2 commit 97fe4bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 8 additions & 4 deletions .circleci/release-github.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash -eu

body="### New Features\r\n\r\n### Closed Bugs\r\n\r\n### Improvements\r\n"
body="### New Features\r\n\r\n### Closed Bugs\r\n\r\n### Improvements\r\n\r\n### Misc\r\n"

echo "Creating a GitHub release with tag [${VERSION}] and name [${VERSION_NAME}]"

responseJson=$(curl \
-u ${GITHUB_USERNAME}:${GITHUB_TOKEN} \
-H "Content-Type: application/vnd.github.v3+json" \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
https://api.github.com/repos/build-canaries/nevergreen/releases \
-d "{\"tag_name\": \"v${VERSION}\", \"target_commitish\": \"main\", \"name\": \"${VERSION_NAME}\", \"body\": \"${body}\", \"draft\": true, \"prerelease\": false}" \
https://api.github.com/repos/build-canaries/nevergreen/releases)

Expand All @@ -17,7 +19,9 @@ uploadUrl=$(echo ${responseJson} | jq -r '.upload_url' | sed "s|{?name,label}||"
echo "Adding the nevergreen-standalone.jar as an asset using URL [${uploadUrl}]"

curl \
-u ${GITHUB_USERNAME}:${GITHUB_TOKEN} \
-X POST \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github+json" \
-H "Content-Type: application/zip" \
--data-binary '@./target/nevergreen-standalone.jar' \
"${uploadUrl}?name=nevergreen-standalone.jar"
2 changes: 1 addition & 1 deletion .circleci/release-tweet.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -eu

status="Nevergreen v${VERSION} ${VERSION_NAME} has been released! Find out more from https://github.com/build-canaries/nevergreen or try it for yourself at https://nevergreen.io"
status="Nevergreen v${VERSION} ${VERSION_NAME} has been released! Find out more from https://github.com/build-canaries/nevergreen"

echo "${status}"

Expand Down
5 changes: 0 additions & 5 deletions .talismanrc

This file was deleted.

0 comments on commit 97fe4bf

Please sign in to comment.