Skip to content

Commit 94668fa

Browse files
committed
try to fix upload release asset
1 parent 7c0baad commit 94668fa

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,24 @@ jobs:
276276
$newName = "$name-$suffix.whl"
277277
echo "wheel_name=$newName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
278278
279-
- name: Upload Release Asset
279+
- name: Upload Release Asset (Unix)
280+
if: runner.os != 'Windows'
281+
uses: actions/upload-release-asset@v1
282+
env:
283+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
284+
with:
285+
upload_url: ${{ needs.create_release.outputs.upload_url }}
286+
asset_path: ${{ steps.find_wheel_unix.outputs.wheel_path }}
287+
asset_name: ${{ steps.find_wheel_unix.outputs.wheel_name }}
288+
asset_content_type: application/zip
289+
290+
- name: Upload Release Asset (Windows)
291+
if: runner.os == 'Windows'
280292
uses: actions/upload-release-asset@v1
281293
env:
282294
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
283295
with:
284296
upload_url: ${{ needs.create_release.outputs.upload_url }}
285-
asset_path: ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_path || steps.find_wheel_unix.outputs.wheel_path }}
286-
asset_name: ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_name || steps.find_wheel_unix.outputs.wheel_name }}
297+
asset_path: ${{ steps.find_wheel_windows.outputs.wheel_path }}
298+
asset_name: ${{ steps.find_wheel_windows.outputs.wheel_name }}
287299
asset_content_type: application/zip

0 commit comments

Comments
 (0)