trigger:
- main

pool:
  vmImage: 'ubuntu-20.04'

variables:
  buildConfiguration: 'Release'

steps:
- task: DotNetCoreCLI@2
  inputs:
    command: 'build'

- task: DotNetCoreCLI@2
  inputs:
    command: 'test'
- task: DotNetCoreCLI@2
  inputs:
    command: 'push'
    packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
    nuGetFeedType: 'external'
    publishFeedCredentials: 'Nuget rest-mock-core'

trigger:
- main

pool:
  vmImage: 'ubuntu-20.04'

variables:
  buildConfiguration: 'Release'

steps:

- task: UseDotNet@2
  displayName: 'Install dotnet 3.1 SDK'
  inputs:
    version: '3.1.x'
    packageType: sdk

- task: DotNetCoreCLI@2
  displayName: 'Build the solution'
  inputs:
    command: 'build'

- task: DotNetCoreCLI@2
  displayName: 'Run the tests'
  inputs:
    command: 'test'

- task: DotNetCoreCLI@2
  displayName: 'Packing'
  inputs:
    command: 'pack'
    versioningScheme: byEnvVar
    versionEnvVar: PackageVersion
    packagesToPack: '**/RestMockCore.csproj'

- task: NuGetCommand@2
  displayName: 'Push to nuget.org'
  inputs:
    command: 'push'
    packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
    nuGetFeedType: 'external'
    publishFeedCredentials: 'Nuget rest-mock-core'

Update aversioning of nuget package
Update aversioning of nuget package
