78 строки
2.0 KiB
YAML
78 строки
2.0 KiB
YAML
trigger:
|
|
- main
|
|
- rel/*
|
|
|
|
pr:
|
|
- main
|
|
- rel/*
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
- job: Build
|
|
pool:
|
|
vmImage: windows-latest
|
|
|
|
variables:
|
|
BuildConfiguration: Release
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
|
|
steps:
|
|
- task: UseDotNet@2
|
|
inputs:
|
|
packageType: sdk
|
|
displayName: 'Use .NET Core sdk'
|
|
|
|
- script: dotnet tool restore
|
|
displayName: Install NBGV and other dotnet tools
|
|
|
|
- script: dotnet nbgv cloud
|
|
displayName: Set Version
|
|
|
|
- script: dotnet pack dirs.proj
|
|
displayName: Create package(s)
|
|
|
|
- publish: $(Build.ArtifactStagingDirectory)\Packages
|
|
displayName: Publish build packages
|
|
artifact: BuildPackages
|
|
|
|
- publish: config
|
|
displayName: Publish signing config
|
|
artifact: config
|
|
|
|
- stage: CodeSign
|
|
condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))
|
|
jobs:
|
|
- deployment: CodeSign
|
|
displayName: Code Signing
|
|
pool:
|
|
vmImage: windows-latest
|
|
environment: Code Sign - CI
|
|
variables:
|
|
- group: SignClient-DNF
|
|
strategy:
|
|
runOnce:
|
|
deploy:
|
|
steps:
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: custom
|
|
custom: tool
|
|
arguments: install --tool-path . SignClient
|
|
displayName: Install SignTool tool
|
|
|
|
- pwsh: |
|
|
.\SignClient "Sign" `
|
|
--baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
|
|
--input "**/*.nupkg" `
|
|
--config "$(Pipeline.Workspace)\config\SignClient.json" `
|
|
--user "$(SignClientUser)" `
|
|
--secret '$(SignClientSecret)' `
|
|
--name "DotNet.ReproducibleBuilds" `
|
|
--description "DotNet.ReproducibleBuilds" `
|
|
--descriptionUrl "https://github.com/dotnet/reproducible-builds"
|
|
displayName: Sign packages
|
|
|
|
- publish: $(Pipeline.Workspace)/BuildPackages
|
|
displayName: Publish Signed Packages
|
|
artifact: SignedPackages |