opentelemetry-dotnet/.vsts/ci-myget-update.yml

66 lines
1.5 KiB
YAML

# CI build with the upload to MyGet
variables:
DotNetVersion: "3.1.101"
trigger:
branches:
include:
- master
# no PR builds
pr: none
pool:
vmImage: 'windows-latest'
steps:
- task: UseDotNet@2
displayName: force use of desired dotnet version
inputs:
version: $(DotNetVersion)
# "restore" is run automatically by "build"
- task: VSBuild@1
displayName: build solution using VS (Release)
inputs:
solution: OpenTelemetry.proj
vsVersion: "latest"
platform: "AnyCPU"
configuration: "Release"
msbuildArgs: "/p:OS=$(Agent.OS)"
- task: DotNetCoreCLI@2
displayName: test using CLI
inputs:
command: "test"
projects: |
test/**/*.Tests.csproj
test/**/*.Tests.Win.csproj
arguments: "--configuration Release"
- task: PublishTestResults@2
- task: VSBuild@1
displayName: pack solution with symbols (Release)
inputs:
solution: OpenTelemetry.proj
vsVersion: "latest"
platform: "AnyCPU"
configuration: "Release"
msbuildArgs: "/p:OS=$(Agent.OS) /p:SymbolPackageFormat=snupkg /target:pack /p:OutDir=$(build.artifactStagingDirectory)"
- task: NuGetCommand@2
displayName: 'Publish nugets to MyGet'
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'myget-opentelemetry'
# this task is required as symbols packages needs to be published manually.
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "$(build.artifactstagingdirectory)"
ArtifactName: "drop"
ArtifactType: "Container"