diff --git a/.github/scripts/upload_gh_assets.sh b/.github/scripts/upload_gh_assets.sh index e4430d3cf0..8bab235f1e 100755 --- a/.github/scripts/upload_gh_assets.sh +++ b/.github/scripts/upload_gh_assets.sh @@ -1,4 +1,6 @@ IFS=',' read -ra ASSETS <<< "$2" +url="$1" +url=${url%%\{*} for ASSET in "${ASSETS[@]}"; do ASSET_NAME=$(basename $ASSET) curl \ @@ -6,5 +8,5 @@ for ASSET in "${ASSETS[@]}"; do -H "Content-Type: $(file -b --mime-type $ASSET)" \ -H "X-GitHub-Api-Version: 2022-11-28" \ --data-binary @"$ASSET" \ - "$1=$ASSET_NAME" + "$url?name=$ASSET_NAME" done \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0bb4cf897..b38519950b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,7 +257,7 @@ jobs: - name: Upload release archives if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os != 'windows-latest' shell: bash - run: .github/scripts/upload_gh_assets.sh ${{ secrets.GITHUB_TOKEN }} ${{ needs.create-release.outputs.upload_url }} + run: .github/scripts/upload_gh_assets.sh ${{ secrets.GITHUB_TOKEN }} ${{ needs.create-release.outputs.upload_url }} ${{ env.ASSET }} - name: Upload release archives (windows) if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest'