From 8b7b4045abd7477f155af4c4826f08190c3d05b6 Mon Sep 17 00:00:00 2001 From: Filip Jeremic Date: Thu, 5 Mar 2020 20:27:33 -0500 Subject: [PATCH] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..016ee20 --- /dev/null +++ b/azure-pipelines.yml @@ -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' \ No newline at end of file