@@ -208,19 +208,25 @@ jobs:
208208 Write-Error "Windows artifact not found in $buildDir"
209209 exit 1
210210 }
211+ Write-Host "Found Windows artifact: $($file.FullName) ($([math]::Round($file.Length/1MB,2)) MB)"
211212 "path=$($file.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
212213 "name=$($file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
213214
214- - name : Upload Release Asset (Windows)
215+ - name : Upload Release Asset (Windows, gh )
215216 if : contains(matrix.config.goos, 'windows')
216- uses : shogo82148/actions-upload-release-asset@v1
217+ shell : pwsh
217218 env :
218219 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
219- with :
220- upload_url : ${{ steps.get_release.outputs.upload_url }}
221- asset_name : ${{ steps.win_artifact.outputs.name }}
222- asset_path : ${{ steps.win_artifact.outputs.path }}
223- asset_content_type : application/octet-stream
220+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
221+ run : |
222+ $tag = "${{ github.event.inputs.version }}"
223+ $path = "${{ steps.win_artifact.outputs.path }}"
224+ $name = "${{ steps.win_artifact.outputs.name }}"
225+ if (-not (Test-Path $path)) {
226+ Write-Error "Artifact path not found: $path"
227+ exit 1
228+ }
229+ gh release upload $tag $path --clobber --repo "${{ env.repo_owner }}/${{ env.repo_name }}"
224230
225231 - name : Upload Release Asset (Non-Windows)
226232 if : " !contains(matrix.config.goos, 'windows')"
0 commit comments