Skip to content

Commit

Permalink
Set up CI with Azure Pipelines
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
fjeremic committed May 21, 2020
1 parent 683e849 commit 8b7b404
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
trigger:
branches:
include:
- master
tags:
include:
- ?.?.?

pr:
- master

pool:
vmImage: 'windows-latest'

variables:
buildConfiguration: 'Release'

jobs:
- job: CI
displayName: 'Continuous Integration'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: 'restore'
feedsToUse: 'select'

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: '**/*.csproj'
configuration: '$(buildConfiguration)'

- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '**/*.csproj'
configuration: '$(buildConfiguration)'

- job: CD
displayName: 'Continuous Deployment'
dependsOn: CI
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
steps:
- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
command: 'pack'
packagesToPack: '**/*.csproj;!**/*.Tests.csproj'
configuration: '$(buildConfiguration)'
includesymbols: true
includesource: true
versioningScheme: 'off'

- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGetConnection'

0 comments on commit 8b7b404

Please sign in to comment.