1414 type : boolean
1515 default : false
1616
17- env :
18- WINGET_CREATE_GITHUB_TOKEN : ${{ secrets.WINGET_GH_TOKEN }}
19-
2017permissions : {}
2118
2219jobs :
@@ -25,24 +22,11 @@ jobs:
2522 steps :
2623 - name : publish
2724 env :
25+ WINGET_CREATE_GITHUB_TOKEN : ${{ secrets.WINGET_GH_TOKEN }}
2826 VERSION : ${{ inputs.release_tag || github.event.release.tag_name }}
2927 DRY_RUN : ${{ inputs.dry_run || false }}
3028 run : |
31- curl.exe -JLO https://aka.ms/wingetcreate/latest
32- if ($LASTEXITCODE -ne 0) {
33- Write-Error "Failed to download wingetcreate.exe (curl exit code: $LASTEXITCODE)"
34- exit 1
35- }
36- if (-not (Test-Path .\wingetcreate.exe)) {
37- Write-Error "wingetcreate.exe was not downloaded successfully"
38- exit 1
39- }
40- # Verify the signature
41- $sig = Get-AuthenticodeSignature .\wingetcreate.exe
42- if ($sig.Status -ne 'Valid') {
43- Write-Error "Invalid signature on wingetcreate.exe: $($sig.Status)"
44- exit 1
45- }
29+ winget install wingetcreate --accept-source-agreements --accept-package-agreements
4630
4731 $Version = $ENV:VERSION
4832 $DryRun = $ENV:DRY_RUN -eq 'true'
@@ -51,11 +35,11 @@ jobs:
5135 "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-amd64.exe|amd64",
5236 "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-arm64.exe|arm64"
5337 )
54-
38+
5539 # Build command with conditional -s flag
5640 $params = @('update', $PackageId, '-v', $Version, '-u', $Urls)
5741 if (-not $DryRun) {
5842 $params += '-s'
5943 }
60-
61- & .\ wingetcreate.exe @params
44+
45+ & wingetcreate.exe @params
0 commit comments