NetCoreToolTemplates/azure-pipelines.yaml

62 строки
1.5 KiB
YAML

---
trigger:
- main
variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: 1
- group: PackageSigningSecrets
stages:
- stage: assemble
displayName: Assemble
jobs:
- job: build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: 'Ensure .NET 8.0 SDK'
inputs:
packageType: sdk
version: 8.0.x
- task: UseDotNet@2
displayName: 'Ensure .NET 6.0 SDK'
inputs:
packageType: sdk
version: 6.0.x
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
command: build
arguments: --no-restore /p:TreatWarningsAsErrors=True
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
arguments: --no-build --filter Category=Smoke
- task: DotNetCoreCLI@2
displayName: dotnet pack
inputs:
command: pack
packagesToPack: src/Steeltoe.NetCoreTool.Templates.csproj
arguments: --no-build
- task: Powershell@2
displayName: Sign NuGets
inputs:
filePath: sign/SignPackages.ps1
env:
ArtifactStagingDirectory: $(Build.ArtifactStagingDirectory)
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts