diff --git a/.github/scripts/upload_gh_assets.sh b/.github/scripts/upload_gh_assets.sh index a9f1277e94..262eef3b9d 100755 --- a/.github/scripts/upload_gh_assets.sh +++ b/.github/scripts/upload_gh_assets.sh @@ -2,11 +2,11 @@ IFS=',' read -ra ASSETS <<< "$3" url="$2" url=${url%%\{*} for ASSET in "${ASSETS[@]}"; do - ASSET_NAME=$(basename $ASSET) - curl \ - -H "Authorization: Bearer $1" \ - -H "Content-Type: $(file -b --mime-type $ASSET)" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - --data-binary @"$ASSET" \ - "$url?name=$ASSET_NAME" + ASSET_NAME=$(basename $ASSET) + curl \ + -H "Authorization: Bearer $1" \ + -H "Content-Type: $(file -b --mime-type $ASSET)" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + --data-binary @"$ASSET" \ + "$url?name=$ASSET_NAME" done \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fb02b7bbf..04da16df25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -262,5 +262,6 @@ jobs: - name: Upload release archives (windows) if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest' + # This exists purely because the GH runners don't properly escape the path to the bash script and the WSL fails to run it. shell: pwsh run: bash .github/scripts/upload_gh_assets.sh "${{ secrets.GITHUB_TOKEN }}" "${{ needs.create-release.outputs.upload_url }}" "${{ env.ASSET }}" \ No newline at end of file