From 2e588bd0b8966854763f77212f7d8a44bc1f5bb8 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 14 Sep 2021 12:15:19 +0200 Subject: [PATCH] Fix GitHub upload logic for multiple assets --- .github/actions/upload-release-asset/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/upload-release-asset/action.yml b/.github/actions/upload-release-asset/action.yml index 93327473..ccc8d93f 100644 --- a/.github/actions/upload-release-asset/action.yml +++ b/.github/actions/upload-release-asset/action.yml @@ -96,12 +96,12 @@ runs: } # Upload assets - for $file in $filenames; do + for file in $filenames; do if [ -z $asset_name ]; then asset_name=$(basename $file) fi 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}" - 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 shell: bash