File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 workflow_dispatch :
66 inputs :
77 release_tag :
8- description : ' Release tag to publish (e.g., v1.20.5)'
8+ description : " Release tag to publish (e.g., v1.20.5)"
99 required : true
1010 type : string
1111
@@ -22,11 +22,26 @@ jobs:
2222 env :
2323 VERSION : ${{ inputs.release_tag || github.event.release.tag_name }}
2424 run : |
25+ curl.exe -JLO https://aka.ms/wingetcreate/latest
26+ if ($LASTEXITCODE -ne 0) {
27+ Write-Error "Failed to download wingetcreate.exe (curl exit code: $LASTEXITCODE)"
28+ exit 1
29+ }
30+ if (-not (Test-Path .\wingetcreate.exe)) {
31+ Write-Error "wingetcreate.exe was not downloaded successfully"
32+ exit 1
33+ }
34+ # Verify the signature
35+ $sig = Get-AuthenticodeSignature .\wingetcreate.exe
36+ if ($sig.Status -ne 'Valid') {
37+ Write-Error "Invalid signature on wingetcreate.exe: $($sig.Status)"
38+ exit 1
39+ }
40+
2541 $Version = $ENV:VERSION
2642 $PackageId = "Docker.Cagent"
2743 $Urls = @(
2844 "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-amd64.exe|amd64",
2945 "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-arm64.exe|arm64"
3046 )
31- & curl.exe -JLO https://aka.ms/wingetcreate/latest
3247 & .\wingetcreate.exe update $PackageId -s -v $Version -u $Urls
You can’t perform that action at this time.
0 commit comments