Add code and package signing (#1895)

This commit is contained in:
James Newton-King
2018-10-26 11:13:25 +13:00
committed by GitHub
parent d48558b53b
commit 416cb4db0f
7 changed files with 51 additions and 4 deletions
+26
View File
@@ -0,0 +1,26 @@
$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\appsettings.json"
$nupkgs = gci $Env:ArtifactDirectory\*.nupkg -recurse | Select -ExpandProperty FullName
foreach ($nupkg in $nupkgs){
Write-Host "Submitting $nupkg for signing"
.\SignClient 'sign' -c $appSettings -i $nupkg -r $Env:SignClientUser -s $Env:SignClientSecret -n 'Json.NET' -d 'Json.NET' -u 'https://www.newtonsoft.com/json'
Write-Host "Finished signing $nupkg"
}
Write-Host "Sign-package complete"