1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/Sign-Package.ps1 b/scripts/Sign-Package.ps1
new file mode 100644
index 000000000..f38b5227e
--- /dev/null
+++ b/scripts/Sign-Package.ps1
@@ -0,0 +1,25 @@
+$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;
+}
+
+# Setup Variables we need to pass into the sign client tool
+
+$appSettings = "$currentDirectory\SignClient.json"
+
+$appPath = "$currentDirectory\..\packages\SignClient\tools\netcoreapp2.0\SignClient.dll"
+
+$nupgks = ls $currentDirectory\..\*.nupkg | Select -ExpandProperty FullName
+
+foreach ($nupkg in $nupgks){
+ Write-Host "Submitting $nupkg for signing"
+
+ dotnet $appPath '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
|