Skip to content

Commit f02f024

Browse files
committed
ci: fixed bug in sign.ps1
1 parent 04ff15f commit f02f024

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

build/sign.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ function Test-RequiredAssets {
7979
}
8080

8181
Write-Host " ✅ Found $($required.Value) in: $($found.Name)" -ForegroundColor Green
82-
83-
# Verify GitHub attestation
84-
if (-not (Test-GithubAttestation -FilePath $found.FullName -RepoName "Yubico/Yubico.NET.SDK")) {
85-
throw "Attestation verification failed for: $($found.Name)"
86-
}
8782
}
8883
}
8984

@@ -198,6 +193,7 @@ Invoke-NuGetPackageSigning -Thumbprint "0123456789ABCDEF" -WorkingDirectory "C:\
198193
.NOTES
199194
Requires:
200195
- A smart card with the signing certificate
196+
- Github CLI for attestation
201197
- signtool.exe (Windows SDK)
202198
- nuget.exe
203199
- PowerShell 5.1 or later
@@ -287,6 +283,12 @@ function Invoke-NuGetPackageSigning {
287283
$packages = Get-ChildItem -Path $extractPath -Recurse -Include *.nupkg, *.snupkg
288284
foreach ($package in $packages) {
289285
Write-Host " Copying: $($package.Name)"
286+
287+
# Verify GitHub attestation (that the file has been downloaded from our repo)
288+
if (-not (Test-GithubAttestation -FilePath $package.FullName -RepoName "Yubico/Yubico.NET.SDK")) {
289+
throw "Attestation verification failed for: $($package.Name)"
290+
}
291+
290292
Copy-Item -Path $package.FullName -Destination $directories.Unsigned -Force
291293
}
292294
Write-Host "✓ Copied $($packages.Count) package(s)"
@@ -325,7 +327,7 @@ function Invoke-NuGetPackageSigning {
325327
}
326328

327329
# Copy symbol packages to output directory
328-
Write-Host "`nCopying symbol packages..."
330+
Write-Host "`nCopying symbol packages..." -ForegroundColor Yellow
329331
$symbolPackages = Get-ChildItem -Path $directories.Unsigned -Filter "*.snupkg"
330332
foreach ($package in $symbolPackages) {
331333
Write-Host " Copying: $($package.Name)"

0 commit comments

Comments
 (0)