pool:
  vmImage: 'Ubuntu 16.04'

variables:
  buildConfiguration: 'Release'

steps:
- script: |
    msbuild /t:Restore NStack.sln
  displayName: Restore dependencies

- script: |
    if echo $BUILD_SOURCEBRANCH | grep /release/; then perl -pi -e "s/PackageVersion>.*</PackageVersion>${BUILD_SOURCEBRANCHNAME}</" NStack/NStack.csproj; fi
  displayName: Update NuGet package version from branch name

- script: |
    msbuild /p:Configuration=Release NStack.sln
  displayName: Build

- script: |
    cp ./NStack/bin/Release/*.nupkg $BUILD_ARTIFACTSTAGINGDIRECTORY
  displayName: Copy artifacts to staging directory

- task: PublishBuildArtifacts@1
  condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true))

Set up CI with Azure Pipelines
Set up CI with Azure Pipelines

[skip ci]