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

ci: upload artifacts to release #140

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Changes from all commits
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
10 changes: 5 additions & 5 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ create_release() {
local _content_type
local _artifact
local _upload_url
_upload_url=$(jq .upload_url $_release)
_upload_url=$(jq .upload_url $_release | sed 's/"//g' | cut -d{ -f1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sed and cut is removing the {?name,label} at the end of the upload url

log "uploading artifacts to GH release at ($_upload_url)"
for target in ${TARGETS[*]}; do

Expand All @@ -367,19 +367,19 @@ create_release() {
_content_type="application/gzip"
else
_artifact="$target.zip"
_content_type="application/gzip"
_content_type="application/zip"
fi

log "uploading bin/$_artifact.sha256sum"
curl -s -H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: $_content_type" \
-H "Content-Type: $_content_type" \
--data-binary "@bin/${_artifact}.sha256sum" \
"${_upload_url}?name=${_artifact}.sha256sum"

log "uploading bin/$_artifact"
curl -s -H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: $_content_type" \
--data-binary "@bin/$_artifact" \
-H "Content-Type: $_content_type" \
--data-binary "@bin/$_artifact" \
"${_upload_url}?name=${_artifact}"

done
Expand Down