# uSync Package Build
# creates the uSync nuget packages, pushes them to a public devops feed

trigger:
- v8/8.2

pool:
  name: Default
  demands:
  - msbuild
  - visualstudio

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'PackageOnlyBuild'
  packageVersion: '8.2.0-build-$(Build.BuildId)'

steps:
- task: NuGetToolInstaller@1

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

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: NuGetCommand@2
  displayName: 'Creating NuGet Packages'
  inputs:
    command: 'pack'
    packagesToPack: '**/*.nuspec'
    versioningScheme: 'byEnvVar'
    versionEnvVar: 'packageVersion'
    buildProperties: 'depends=$(packageVersion)'

- task: NuGetCommand@2
  displayName: 'Pushing to the public nightly feed'
  inputs:
    command: 'push'
    packagesToPush: '$(Build.ArtifactStagingDirectory)/**/uSync*.nupkg'
    nuGetFeedType: 'internal'
    publishVstsFeed: 'b5f11e6f-5f5f-4e7f-858d-ec234c2e8e65/9e2b6c0a-55ae-49ff-8c70-ec6e80934adc'
    allowPackageConflicts: true
    verbosityPush: Normal
Set up CI with Azure Pipelines
Set up CI with Azure Pipelines

[skip ci]