Fix GitHub upload logic for multiple assets

This commit is contained in:
Reuben Morais 2021-09-14 12:15:19 +02:00
parent abc0399fdb
commit 2e588bd0b8

View File

@ -96,12 +96,12 @@ runs:
} }
# Upload assets # Upload assets
for $file in $filenames; do for file in $filenames; do
if [ -z $asset_name ]; then if [ -z $asset_name ]; then
asset_name=$(basename $file) asset_name=$(basename $file)
fi fi
echo "Uploading asset with name: $asset_name from file: $file" echo "Uploading asset with name: $asset_name from file: $file"
GH_ASSET="https://uploads.github.com/repos/${owner}/${repo}/releases/${id}/assets?name=${asset_name}" GH_ASSET="https://uploads.github.com/repos/${owner}/${repo}/releases/${id}/assets?name=${asset_name}"
curl -T $filename -X POST -H "${AUTH}" -H "Content-Type: application/octet-stream" $GH_ASSET curl -T $file -X POST -H "${AUTH}" -H "Content-Type: application/octet-stream" $GH_ASSET
done done
shell: bash shell: bash