From e0e5b0391c760429e11877c6b81af098c395f26b Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 14 Sep 2021 12:47:25 +0200 Subject: [PATCH] Don't overwrite asset_name for multiple files --- .github/actions/upload-release-asset/action.yml | 8 +++++--- .github/workflows/build-and-test.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/actions/upload-release-asset/action.yml b/.github/actions/upload-release-asset/action.yml index 6923214f..43f86f27 100644 --- a/.github/actions/upload-release-asset/action.yml +++ b/.github/actions/upload-release-asset/action.yml @@ -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 diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a61fae5b..81718518 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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: