Files
wpf-notifyicon/azure-pipelines.yml
2020-01-29 10:15:49 +01:00

85 lines
2.1 KiB
YAML

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
batch: true
branches:
include:
- master
- feature/*
exclude:
- gh-pages
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'Windows-latest'
variables:
solution: '**/src/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 3.1'
inputs:
packageType: sdk
version: 3.1.101
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: '$(solution)'
arguments: '--configuration $(buildConfiguration) /p:Platform="$(buildPlatform)"'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
**\bin\$(buildConfiguration)\*.nupkg
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- publish: $(Build.ArtifactStagingDirectory)
artifact: drop
- stage: Deploy
jobs:
- deployment: DeployNuGet
pool:
vmImage: 'Windows-2019'
environment: 'NuGet'
strategy:
# default deployment strategy
runOnce:
deploy:
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: 'drop'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.4.0'
inputs:
versionSpec: 5.4.0
checkLatest: true
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(Pipeline.Workspace)/drop/*.nupkg;!$(Pipeline.Workspace)/drop/*.symbols.nupkg'
nuGetFeedType: external
# publishFeedCredentials: 'NotifyIcon nuget push'