@@ -48,82 +48,91 @@ jobs:
4848 env :
4949 GH_TOKEN : ${{ github.token }}
5050 run : |
51- $WorkflowName = "LLVM prebuilt"
51+ $Workflow = "LLVM prebuilt"
52+ $Repository = $Env:GITHUB_REPOSITORY
5253 $RunId = '${{ github.event.inputs.llvm_run_id }}'
5354 if ($RunId -eq 'latest') {
54- $RunId = $(gh run list -w $WorkflowName --json 'status,databaseId,conclusion') |
55+ $RunId = $(gh run list -R $Repository - w $Workflow --json 'status,databaseId,conclusion') |
5556 ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
5657 Select-Object -First 1 -ExpandProperty databaseId
5758 }
58- Write-Host "Downloading run $RunId ($WorkflowName )"
59- & gh run download $RunId
59+ Write-Host "Downloading run $RunId ($Workflow )"
60+ & gh run download -R $Repository $RunId
6061
6162 - name : Download halide
6263 shell : pwsh
6364 env :
6465 GH_TOKEN : ${{ github.token }}
6566 run : |
66- $WorkflowName = "halide prebuilt"
67+ $Workflow = "halide prebuilt"
68+ $Repository = $Env:GITHUB_REPOSITORY
6769 $RunId = '${{ github.event.inputs.halide_run_id }}'
6870 if ($RunId -eq 'latest') {
69- $RunId = $(gh run list -w $WorkflowName --json 'status,databaseId,conclusion') |
71+ $RunId = $(gh run list -R $Repository - w $Workflow --json 'status,databaseId,conclusion') |
7072 ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
7173 Select-Object -First 1 -ExpandProperty databaseId
7274 }
73- Write-Host "Downloading run $RunId ($WorkflowName )"
74- & gh run download $RunId
75+ Write-Host "Downloading run $RunId ($Workflow )"
76+ & gh run download -R $Repository $RunId
7577
7678 - name : Download rust
7779 shell : pwsh
7880 env :
7981 GH_TOKEN : ${{ github.token }}
8082 run : |
81- $WorkflowName = "Rust prebuilt"
83+ $Workflow = "Rust prebuilt"
84+ $Repository = $Env:GITHUB_REPOSITORY
8285 $RunId = '${{ github.event.inputs.rust_run_id }}'
8386 if ($RunId -eq 'latest') {
84- $RunId = $(gh run list -w $WorkflowName --json 'status,databaseId,conclusion') |
87+ $RunId = $(gh run list -R $Repository - w $Workflow --json 'status,databaseId,conclusion') |
8588 ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
8689 Select-Object -First 1 -ExpandProperty databaseId
8790 }
88- Write-Host "Downloading run $RunId ($WorkflowName )"
89- & gh run download $RunId
91+ Write-Host "Downloading run $RunId ($Workflow )"
92+ & gh run download -R $Repository $RunId
9093
9194 - name : Download cctools
9295 shell : pwsh
9396 env :
9497 GH_TOKEN : ${{ github.token }}
9598 run : |
96- $WorkflowName = "cctools prebuilt"
99+ $Workflow = "cctools prebuilt"
100+ $Repository = $Env:GITHUB_REPOSITORY
97101 $RunId = '${{ github.event.inputs.cctools_run_id }}'
98102 if ($RunId -eq 'latest') {
99- $RunId = $(gh run list -w $WorkflowName --json 'status,databaseId,conclusion') |
103+ $RunId = $(gh run list -R $Repository - w $Workflow --json 'status,databaseId,conclusion') |
100104 ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
101105 Select-Object -First 1 -ExpandProperty databaseId
102106 }
103- Write-Host "Downloading run $RunId ($WorkflowName )"
104- & gh run download $RunId
107+ Write-Host "Downloading run $RunId ($Workflow )"
108+ & gh run download -R $Repository $RunId
105109
106110 - name : Download darling
107111 shell : pwsh
108112 env :
109113 GH_TOKEN : ${{ github.token }}
110114 run : |
111- $WorkflowName = "darling prebuilt"
115+ $Workflow = "darling prebuilt"
116+ $Repository = $Env:GITHUB_REPOSITORY
112117 $RunId = '${{ github.event.inputs.darling_run_id }}'
113118 if ($RunId -eq 'latest') {
114- $RunId = $(gh run list -w $WorkflowName --json 'status,databaseId,conclusion') |
119+ $RunId = $(gh run list -R $Repository - w $Workflow --json 'status,databaseId,conclusion') |
115120 ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
116121 Select-Object -First 1 -ExpandProperty databaseId
117122 }
118- Write-Host "Downloading run $RunId ($WorkflowName )"
119- & gh run download $RunId
123+ Write-Host "Downloading run $RunId ($Workflow )"
124+ & gh run download -R $Repository $RunId
120125
121126 - name : Create GitHub Release
122127 shell : pwsh
123128 env :
124129 GH_TOKEN : ${{ github.token }}
125130 if : ${{ github.event.inputs.dry-run == 'false' }}
126131 run : |
132+ $RootDir = Get-Location
133+ Get-ChildItem *.tar.xz -Depth 2 | % { Move-Item $_.FullName $RootDir -Force }
134+ Get-ChildItem . -Directory -Recurse | % { if (-Not (Test-Path ($_.FullName + "\*"))) { Remove-Item $_ } }
135+
127136 $HashPath = 'checksums'
128137 $Version = '${{ github.event.inputs.version }}'
129138 $DraftRelease = [System.Convert]::ToBoolean('${{ github.event.inputs.draft-release }}')
@@ -134,7 +143,7 @@ jobs:
134143 Get-Content $HashPath
135144 echo "::endgroup::"
136145
137- $ReleaseTag = "v$Version"
146+ $ReleaseTag = "v${ Version} "
138147 $Repository = $Env:GITHUB_REPOSITORY
139148 $ReleaseTitle = "v${Version}"
140149
0 commit comments