@@ -48,82 +48,91 @@ jobs:
48
48
env :
49
49
GH_TOKEN : ${{ github.token }}
50
50
run : |
51
- $WorkflowName = "LLVM prebuilt"
51
+ $Workflow = "LLVM prebuilt"
52
+ $Repository = $Env:GITHUB_REPOSITORY
52
53
$RunId = '${{ github.event.inputs.llvm_run_id }}'
53
54
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') |
55
56
ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
56
57
Select-Object -First 1 -ExpandProperty databaseId
57
58
}
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
60
61
61
62
- name : Download halide
62
63
shell : pwsh
63
64
env :
64
65
GH_TOKEN : ${{ github.token }}
65
66
run : |
66
- $WorkflowName = "halide prebuilt"
67
+ $Workflow = "halide prebuilt"
68
+ $Repository = $Env:GITHUB_REPOSITORY
67
69
$RunId = '${{ github.event.inputs.halide_run_id }}'
68
70
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') |
70
72
ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
71
73
Select-Object -First 1 -ExpandProperty databaseId
72
74
}
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
75
77
76
78
- name : Download rust
77
79
shell : pwsh
78
80
env :
79
81
GH_TOKEN : ${{ github.token }}
80
82
run : |
81
- $WorkflowName = "Rust prebuilt"
83
+ $Workflow = "Rust prebuilt"
84
+ $Repository = $Env:GITHUB_REPOSITORY
82
85
$RunId = '${{ github.event.inputs.rust_run_id }}'
83
86
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') |
85
88
ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
86
89
Select-Object -First 1 -ExpandProperty databaseId
87
90
}
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
90
93
91
94
- name : Download cctools
92
95
shell : pwsh
93
96
env :
94
97
GH_TOKEN : ${{ github.token }}
95
98
run : |
96
- $WorkflowName = "cctools prebuilt"
99
+ $Workflow = "cctools prebuilt"
100
+ $Repository = $Env:GITHUB_REPOSITORY
97
101
$RunId = '${{ github.event.inputs.cctools_run_id }}'
98
102
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') |
100
104
ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
101
105
Select-Object -First 1 -ExpandProperty databaseId
102
106
}
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
105
109
106
110
- name : Download darling
107
111
shell : pwsh
108
112
env :
109
113
GH_TOKEN : ${{ github.token }}
110
114
run : |
111
- $WorkflowName = "darling prebuilt"
115
+ $Workflow = "darling prebuilt"
116
+ $Repository = $Env:GITHUB_REPOSITORY
112
117
$RunId = '${{ github.event.inputs.darling_run_id }}'
113
118
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') |
115
120
ConvertFrom-Json | Where-Object { ($_.status -eq 'completed') -and ($_.conclusion -eq 'success') } |
116
121
Select-Object -First 1 -ExpandProperty databaseId
117
122
}
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
120
125
121
126
- name : Create GitHub Release
122
127
shell : pwsh
123
128
env :
124
129
GH_TOKEN : ${{ github.token }}
125
130
if : ${{ github.event.inputs.dry-run == 'false' }}
126
131
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
+
127
136
$HashPath = 'checksums'
128
137
$Version = '${{ github.event.inputs.version }}'
129
138
$DraftRelease = [System.Convert]::ToBoolean('${{ github.event.inputs.draft-release }}')
@@ -134,7 +143,7 @@ jobs:
134
143
Get-Content $HashPath
135
144
echo "::endgroup::"
136
145
137
- $ReleaseTag = "v$Version"
146
+ $ReleaseTag = "v${ Version} "
138
147
$Repository = $Env:GITHUB_REPOSITORY
139
148
$ReleaseTitle = "v${Version}"
140
149
0 commit comments