# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
  PackageVersion: '2.0.15'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: Assembly-Info-NetFramework@2
  inputs:
    Path: '$(Build.SourcesDirectory)'
    FileNames: |
      **\AssemblyInfo.cs
    InsertAttributes: false
    FileEncoding: 'auto'
    WriteBOM: false
    VersionNumber: 'PackageVersion'
    LogLevel: 'verbose'
    FailOnWarning: false

- task: MSBuild@1
  inputs:
    solution: 'CodeEndeavors.Extensions\CodeEndeavors.Extensions.csproj'
    msbuildVersion: '4.0'

- task: NuGetCommand@2
  inputs:
    command: pack
    packagesToPack: '$(Build.SourcesDirectory)/redist/CodeEndeavors.Extensions.nuspec'
    versioningScheme: byEnvVar
    versionEnvVar: PackageVersion
    packDestination: '$(Build.SourcesDirectory)/redist'

- task: NuGetCommand@2
  displayName: 'NuGet push'
  inputs:
    command: 'push'
    packagesToPush: '$(Build.SourcesDirectory)/redist/**/*.nupkg;!$(Build.SourcesDirectory)/redist/**/*.symbols.nupkg'
    nuGetFeedType: 'internal'
    publishVstsFeed: 'ac758a19-2517-4b8d-9d83-43bd02106e50'
    allowPackageConflicts: false
Set up CI with Azure Pipelines
Set up CI with Azure Pipelines

[skip ci]