diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Sign-Package.ps1 | 24 | ||||
-rw-r--r-- | scripts/SignClient.json | 13 |
2 files changed, 37 insertions, 0 deletions
diff --git a/scripts/Sign-Package.ps1 b/scripts/Sign-Package.ps1 new file mode 100644 index 000000000..ef144a114 --- /dev/null +++ b/scripts/Sign-Package.ps1 @@ -0,0 +1,24 @@ +$currentDirectory = split-path $MyInvocation.MyCommand.Definition + +# See if we have the ClientSecret available +if([string]::IsNullOrEmpty($env:SignClientSecret)){ + Write-Host "Client Secret not found, not signing packages" + return; +} + +dotnet tool install --tool-path . SignClient + +# Setup Variables we need to pass into the sign client tool +$appSettings = "$currentDirectory\SignClient.json" + +$nupgks = ls $Env:ArtifactDirectory\*.nupkg | Select -ExpandProperty FullName + +foreach ($nupkg in $nupgks){ + Write-Host "Submitting $nupkg for signing" + + .\SignClient 'sign' -c $appSettings -i $nupkg -r $env:SignClientUser -s $env:SignClientSecret -n 'Portable.BouncyCastle' -d 'Portable.BouncyCastle' -u 'https://github.com/onovotny/bc-sharp' + + Write-Host "Finished signing $nupkg" +} + +Write-Host "Sign-package complete" \ No newline at end of file diff --git a/scripts/SignClient.json b/scripts/SignClient.json new file mode 100644 index 000000000..7ca5736a7 --- /dev/null +++ b/scripts/SignClient.json @@ -0,0 +1,13 @@ +{ + "SignClient": { + "AzureAd": { + "AADInstance": "https://login.microsoftonline.com/", + "ClientId": "6632f806-5a64-4bc6-87cf-b622b2ec62d3", + "TenantId": "71048637-3782-41a3-b6b2-6f4ac8a25ae0" + }, + "Service": { + "Url": "https://codesign.novotny.org/", + "ResourceId": "https://SignService/0263d4ba-331b-46d1-85e1-bee9898a65a6" + } + } +} \ No newline at end of file |