Skip to content

Commit

Permalink
publish bundle hashes as part of the release (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo authored Apr 19, 2022
1 parent 98019b4 commit a963526
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions scripts/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,20 @@ if [ -z "$BUILD_FIL_NETWORK" ]; then
fi


release_file=output/builtin-actors.car
release_input=builtin-actors.car
release_target=builtin-actors-${BUILD_FIL_NETWORK}.car
release_target_hash=builtin-actors-${BUILD_FIL_NETWORK}.sha256
release_file=output/$release_target
release_file_hash=output/$release_target_hash
release_tag="${GITHUB_SHA:0:16}"

# prepare artifacts
pushd output
mv $release_input $release_target
shasum -a 256 $release_target > $release_target_hash
popd

# prepare release
ORG="filecoin-project"
REPO="builtin-actors"

Expand Down Expand Up @@ -58,11 +68,20 @@ else
echo "release $release_tag already exists"
fi

echo "uploading $release_target"
__release_upload_url=`echo $__release_response | jq -r '.upload_url' | cut -d'{' -f1`

echo "uploading $release_target"
curl \
--request POST \
--header "Authorization: token $GITHUB_TOKEN" \
--header "Content-Type: application/octet-stream" \
--data-binary "@$release_file" \
"$__release_upload_url?name=$release_target"

echo "uploading $release_target_hash"
curl \
--request POST \
--header "Authorization: token $GITHUB_TOKEN" \
--header "Content-Type: application/octet-stream" \
--data-binary "@$release_file_hash" \
"$__release_upload_url?name=$release_target_hash"

0 comments on commit a963526

Please sign in to comment.