Skip to content

Commit 500db35

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 73247d4 commit 500db35

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

0 commit comments

Comments
 (0)