Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Updates to lotus CI build process #6256

Merged
merged 2 commits into from
May 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ executors:
resource_class: 2xlarge
ubuntu:
docker:
- image: ubuntu:19.10
- image: ubuntu:20.04

commands:
install-deps:
Expand Down
11 changes: 7 additions & 4 deletions scripts/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ if [ "${RELEASE_ID}" = "null" ]; then
RELEASE_DATA="{
\"tag_name\": \"${CIRCLE_TAG}\",
\"target_commitish\": \"${CIRCLE_SHA1}\",
\"discussion_category_name\": \"announcement\",
placer14 marked this conversation as resolved.
Show resolved Hide resolved
\"name\": \"${CIRCLE_TAG}\",
\"body\": \"\",
\"prerelease\": false
Expand All @@ -51,26 +52,28 @@ else
fi

RELEASE_UPLOAD_URL=`echo "${RELEASE_RESPONSE}" | jq -r '.upload_url' | cut -d'{' -f1`
echo "Preparing to send artifacts to ${RELEASE_UPLOAD_URL}"

bundles=(
artifacts=(
"lotus_${CIRCLE_TAG}_linux-amd64.tar.gz"
"lotus_${CIRCLE_TAG}_linux-amd64.tar.gz.cid"
"lotus_${CIRCLE_TAG}_linux-amd64.tar.gz.sha512"
"lotus_${CIRCLE_TAG}_darwin-amd64.tar.gz"
"lotus_${CIRCLE_TAG}_darwin-amd64.tar.gz.cid"
"lotus_${CIRCLE_TAG}_darwin-amd64.tar.gz.sha512"
)
for RELEASE_FILE in "${bundles[@]}"

for RELEASE_FILE in "${artifacts[@]}"
do
echo "Uploading release bundle: ${RELEASE_FILE}"
echo "Uploading ${RELEASE_FILE}..."
curl \
--request POST \
--header "Authorization: token ${GITHUB_TOKEN}" \
--header "Content-Type: application/octet-stream" \
--data-binary "@${RELEASE_FILE}" \
"$RELEASE_UPLOAD_URL?name=$(basename "${RELEASE_FILE}")"

echo "Release bundle uploaded: ${RELEASE_FILE}"
echo "Uploaded ${RELEASE_FILE}"
done

popd
Expand Down