Skip to content

Commit 29529a1

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 d6b3c7c commit 29529a1

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

.azure-pipelines/release.yml

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

0 commit comments

Comments
 (0)