Skip to content

Commit f904a20

Browse files
committed
.azure-pipelines/release.yml: add .NET Tool release pipeline
Add a release pipeline for the .NET Tool using Azure Pipelines. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 55f7419 commit f904a20

1 file changed

Lines changed: 106 additions & 0 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,109 @@ extends:
447447
# "Parameters": {}
448448
# }
449449
# ]
450+
451+
#
452+
# .NET Tool / NuGet Package build jobs
453+
#
454+
- job: nuget_package
455+
displayName: '.NET Tool NuGet Package'
456+
pool:
457+
name: GitClient-1ESHostedPool-intel-pc
458+
image: ubuntu-x86_64-ado1es
459+
os: linux
460+
variables:
461+
version: $[stageDependencies.validate.vars.outputs['version.value']]
462+
templateContext:
463+
outputs:
464+
- output: pipelineArtifact
465+
targetPath: '$(Build.ArtifactStagingDirectory)/payload'
466+
artifactName: 'nuget_payload'
467+
- output: pipelineArtifact
468+
targetPath: '$(Build.ArtifactStagingDirectory)/packages'
469+
artifactName: 'nuget_packages'
470+
steps:
471+
- checkout: self
472+
- task: UseDotNet@2
473+
displayName: 'Use .NET 8 SDK'
474+
inputs:
475+
packageType: sdk
476+
version: '8.x'
477+
- task: Bash@3
478+
displayName: 'Build payload'
479+
inputs:
480+
targetType: filePath
481+
filePath: './src/shared/DotnetTool/layout.sh'
482+
arguments: |
483+
--configuration="Release" \
484+
--output="$(Build.ArtifactStagingDirectory)/payload"
485+
# - task: EsrpCodeSigning@5
486+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
487+
# displayName: 'Sign payload'
488+
# inputs:
489+
# connectedServiceName: '$(esrpConnectionName)'
490+
# appRegistrationClientId: '$(esrpClientId)'
491+
# appRegistrationTenantId: '$(esrpTenantId)'
492+
# authAkvName: '$(esrpAuthAkvName)'
493+
# authCertName: '$(esrpAuthCertName)'
494+
# authSignCertName: '$(esrpAuthSignCertName)'
495+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
496+
# folderPath: '$(Build.ArtifactStagingDirectory)/payload'
497+
# pattern: '**\*.exe;**\*.dll'
498+
# signConfigType: inlineSignParams
499+
# inlineOperation: |
500+
# [
501+
# {
502+
# "KeyCode": "CP-230012",
503+
# "OperationCode": "SigntoolSign",
504+
# "ToolName": "sign",
505+
# "ToolVersion": "1.0",
506+
# "Parameters": {
507+
# "OpusName": "Microsoft",
508+
# "OpusInfo": "https://www.microsoft.com",
509+
# "FileDigest": "/fd SHA256",
510+
# "PageHash": "/NPH",
511+
# "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
512+
# }
513+
# },
514+
# {
515+
# "KeyCode": "CP-230012",
516+
# "OperationCode": "SigntoolVerify",
517+
# "ToolName": "sign",
518+
# "ToolVersion": "1.0",
519+
# "Parameters": {}
520+
# }
521+
# ]
522+
- task: Bash@3
523+
displayName: 'Create NuGet package'
524+
inputs:
525+
targetType: filePath
526+
filePath: './src/shared/DotnetTool/pack.sh'
527+
arguments: |
528+
--configuration=Release \
529+
--version="$(version)" \
530+
--package-root="$(Build.ArtifactStagingDirectory)/payload" \
531+
--output="$(Build.ArtifactStagingDirectory)/packages"
532+
# - task: EsrpCodeSigning@5
533+
# condition: and(succeeded(), eq('${{ parameters.esrp }}', true))
534+
# displayName: 'Sign payload'
535+
# inputs:
536+
# connectedServiceName: '$(esrpConnectionName)'
537+
# appRegistrationClientId: '$(esrpClientId)'
538+
# appRegistrationTenantId: '$(esrpTenantId)'
539+
# authAkvName: '$(esrpAuthAkvName)'
540+
# authCertName: '$(esrpAuthCertName)'
541+
# authSignCertName: '$(esrpAuthSignCertName)'
542+
# serviceEndpointUrl: '$(esrpEndpointUrl)'
543+
# folderPath: '$(Build.ArtifactStagingDirectory)/packages'
544+
# pattern: '**/*'
545+
# signConfigType: inlineSignParams
546+
# inlineOperation: |
547+
# [
548+
# {
549+
# "KeyCode": "CP-401405",
550+
# "OperationCode": "NuGetSign",
551+
# "ToolName": "sign",
552+
# "ToolVersion": "1.0",
553+
# "Parameters": {}
554+
# }
555+
# ]

0 commit comments

Comments
 (0)