Skip to content
Next Next commit
Updated azure pipelines for signing nuget packages
  • Loading branch information
t-lair committed Nov 27, 2023
commit 59cae0c6bfe3ff2acccf65c66dcf34d31af38f2d
23 changes: 18 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ parameters:
displayName: 'Execute Veracode SCA'
type: boolean
default: false

variables:
- group: code-signing

steps:
- checkout: self
clean: true
Expand Down Expand Up @@ -101,12 +103,23 @@ steps:
command: pack
searchPatternPack: Src\StackifyLib\*.csproj;
nobuild: true
- task: PowerShell@2
displayName: 'Sign Nuget Packages'
- task: DotNetCoreCLI@2
inputs:
targetType: inline
script: dotnet nuget sign $(Build.ArtifactStagingDirectory)\*.nupkg --certificate-path $(Build.SourcesDirectory)/certificate.pfx --certificate-password $(codeSigning2023-pw) --timestamper http://timestamp.sectigo.com
command: 'custom'
custom: 'tool'
arguments: 'install --global azuresigntool'
displayName: Install AzureSignTool
- task: CmdLine@2
displayName: 'Sign outputted .exe with global AzureSignTool'
inputs:
script: AzureSignTool sign -du "$(SigningURL)" -kvu "$(SigningVaultURL)" -kvi "$(SigningAppClientId)" -kvs "$(SigningClientSecret)" -kvc "$(SigningCertName)" -tr http://timestamp.digicert.com -v $(Build.ArtifactStagingDirectory)\*.nupkg
workingDirectory: $(Build.SourcesDirectory)
# - task: PowerShell@2
# displayName: 'Sign Nuget Packages'
# inputs:
# targetType: inline
# script: dotnet nuget sign $(Build.ArtifactStagingDirectory)\*.nupkg --certificate-path $(Build.SourcesDirectory)/certificate.pfx --certificate-password $(codeSigning2023-pw) --timestamper http://timestamp.sectigo.com
# workingDirectory: $(Build.SourcesDirectory)
- task: PowerShell@2
displayName: Rename signed assemblies
enabled: False
Expand Down