Skip to content

Commit

Permalink
ci: upload artifacts to release (#140)
Browse files Browse the repository at this point in the history
Signed-off-by: Salim Afiune Maya <[email protected]>
  • Loading branch information
afiune authored Jun 9, 2020
1 parent 4f178ed commit 7e8e03f
Showing 1 changed file with 5 additions and 5 deletions.
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)
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

0 comments on commit 7e8e03f

Please sign in to comment.