Don't overwrite asset_name for multiple files

This commit is contained in:
Reuben Morais 2021-09-14 12:47:25 +02:00
parent 7a20c9bd90
commit e0e5b0391c
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -794,7 +794,7 @@ jobs:
uses: ./.github/actions/upload-release-asset
with:
name: '' # use filename
path: "*.whl"
path: "dist/*.whl"
release-tag: ${{ steps.get-tag.outputs.tag }}
should-create-release: true
twine-upload-stt: