Skip to content

Commit

Permalink
build: Update signing key
Browse files Browse the repository at this point in the history
  • Loading branch information
qdot committed Dec 11, 2021
1 parent 806481a commit df58f41
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions build/setup-signing-key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ steps:
inputs:
targetType: inline
script: |
$kvSecretBytes = [System.Convert]::FromBase64String("$(NPLabsCodeSigningCert)")
$kvSecretBytes = [System.Convert]::FromBase64String("$(NPLabsCodeSigningCert202105)")
$certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$certCollection.Import($kvSecretBytes,$null,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable)
$password = "$(NPLabsRepoSigningKey)"
$protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $password)
$pfxPath = "SigningCert.pfx"
$pfxPath = "$(System.DefaultWorkingDirectory)\SigningCert.pfx"
[System.IO.File]::WriteAllBytes($pfxPath, $protectedCertificateBytes)
- task: Bash@3
displayName: "Update Nuget"
inputs:
targetType: inline
script: |
nuget update -self
- script: |
setx CSC_LINK ".\SigningCert.pfx"
setx CSC_KEY_PASSWORD "$(NPLabsRepoSigningKey)"
displayName: 'Set signing variables'

0 comments on commit df58f41

Please sign in to comment.