Skip to content

Commit

Permalink
fix: upload checksum file to release
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Jan 3, 2025
1 parent 1030bc9 commit 8d49717
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,16 @@ eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:al
}

# Upload asset
echo "Uploading asset... "
echo -e "\n[*] Uploading asset... "

# Construct url
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename)"

curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" $GH_ASSET

# Upload checksum of asset
echo -e "\n[*] Uploading checksum... "
checksum=$(sha256sum $filename | cut -d ' ' -f 1)
echo "Uploading checksum... "
echo -n "$checksum" >"$filename.sha256"
GH_ASSET="https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$(basename $filename).sha256"
curl "$GITHUB_OAUTH_BASIC" --data-binary @"$filename.sha256" -H "Authorization: token $github_api_token" -H "Content-Type: application/octet-stream" $GH_ASSET

0 comments on commit 8d49717

Please sign in to comment.