@@ -326,21 +326,23 @@ jobs:
326326 env :
327327 GH_TOKEN : ${{ github.token }}
328328 run : |
329+ Set-Location '${{ github.workspace }}'
329330 $version = '${{ needs.pack.outputs.package_version }}'
330331 $tagName = "v$version"
331332 if ('${{ github.ref_type }}' -eq 'tag') {
332333 $tagName = '${{ github.ref_name }}'
333334 }
335+ $repo = '${{ github.repository }}'
334336
335337 $assets = @(Get-ChildItem -Path artifacts\release -File | Sort-Object FullName | ForEach-Object { $_.FullName })
336338 if ($assets.Count -eq 0) {
337339 throw 'No GitHub Release assets were found.'
338340 }
339341
340- & gh release view $tagName *> $null
342+ & gh release view $tagName --repo $repo *> $null
341343 if ($LASTEXITCODE -eq 0) {
342344 Write-Host "Uploading assets to existing GitHub Release $tagName"
343- & gh release upload $tagName @assets --clobber
345+ & gh release upload $tagName @assets --repo $repo -- clobber
344346 } else {
345347 Write-Host "Creating GitHub Release $tagName"
346348 $notes = @(
@@ -350,7 +352,7 @@ jobs:
350352 "- crtsys-$version-native.zip: headers, docs, CMake helpers, native MSBuild imports, and prebuilt x64/ARM64 Debug/Release libraries"
351353 "- crtsys-$version-SHA256SUMS.txt: SHA-256 checksums"
352354 ) -join [Environment]::NewLine
353- & gh release create $tagName @assets --target '${{ github.sha }}' --title "crtsys $version" --notes $notes
355+ & gh release create $tagName @assets --repo $repo -- target '${{ github.sha }}' --title "crtsys $version" --notes $notes
354356 }
355357
356358 if ($LASTEXITCODE -ne 0) {
0 commit comments