Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
+76
-2
@@ -26,10 +26,84 @@ steps:
|
|||||||
projects: 'src/Lithnet.CredentialProvider/Lithnet.CredentialProvider.csproj'
|
projects: 'src/Lithnet.CredentialProvider/Lithnet.CredentialProvider.csproj'
|
||||||
zipAfterPublish: false
|
zipAfterPublish: false
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'custom'
|
||||||
|
custom: 'tool'
|
||||||
|
arguments: 'update --global NuGetKeyVaultSignTool'
|
||||||
|
displayName: Install NugetKeyVaultSignTool
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'custom'
|
||||||
|
custom: 'tool'
|
||||||
|
arguments: 'update --global azuresigntool'
|
||||||
|
displayName: Install AzureSignTool
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: 'Sign files with AzureSignTool'
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
$files = @()
|
||||||
|
$files += (Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)\Lithnet*.dll").FullName
|
||||||
|
|
||||||
|
write-host "Signing $($files.Length) files:"
|
||||||
|
write-output $files
|
||||||
|
|
||||||
|
$cmdargs = @(
|
||||||
|
"sign",
|
||||||
|
"-d", "Lithnet Windows Credential Provider",
|
||||||
|
"-kvu", "$(akv.url)",
|
||||||
|
"-kvi", "$(akv.applicationID)",
|
||||||
|
"-kvs", "$(akv.secret)",
|
||||||
|
"-kvt", "$(akv.tenantId)",
|
||||||
|
"-kvc", "$(akv.certificateName)",
|
||||||
|
"-tr", "http://timestamp.digicert.com",
|
||||||
|
"-td", "sha256"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cmdargs += $files
|
||||||
|
|
||||||
|
& AzureSignTool $cmdargs
|
||||||
|
|
||||||
|
failOnStderr: true
|
||||||
|
showWarnings: true
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: 'Sign Nuget package'
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
$files = @()
|
||||||
|
$files += (Get-ChildItem -Path "$(Build.ArtifactStagingDirectory)\Lithnet*.dll").FullName
|
||||||
|
|
||||||
|
write-host "Signing $($files.Length) files:"
|
||||||
|
write-output $files
|
||||||
|
|
||||||
|
$cmdargs = @(
|
||||||
|
"sign", "$(Build.ArtifactStagingDirectory)\*.nupkg)"
|
||||||
|
"-fd", "sha256",
|
||||||
|
"-kvu", "$(akv.url)",
|
||||||
|
"-kvi", "$(akv.applicationID)",
|
||||||
|
"-kvs", "$(akv.secret)",
|
||||||
|
"-kvt", "$(akv.tenantId)",
|
||||||
|
"-kvc", "$(akv.certificateName)",
|
||||||
|
"-tr", "http://timestamp.digicert.com",
|
||||||
|
"-td", "sha256"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cmdargs += $files
|
||||||
|
|
||||||
|
& NuGetKeyVaultSignTool $cmdargs
|
||||||
|
|
||||||
|
failOnStderr: true
|
||||||
|
showWarnings: true
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: dotnet push
|
displayName: dotnet push
|
||||||
inputs:
|
inputs:
|
||||||
command: 'push'
|
command: 'push'
|
||||||
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
|
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
|
||||||
nuGetFeedType: 'internal'
|
nuGetFeedType: 'external'
|
||||||
publishVstsFeed: '91a552bc-359d-4f28-bdbd-f36f71cfdf81'
|
publishFeedCredentials: 'WindowsCredentialProviderNuget'
|
||||||
|
|||||||
Reference in New Issue
Block a user