variables:
  ENETVER: 11.5.1
  projectAPI:  './ElectronNet.API/ElectronNet.API.csproj'
  projectCLI:  './ElectronNet.CLI/ElectronNet.CLI.csproj'

trigger:
- master

pool:
  vmImage: windows-latest

steps:
- checkout: self
  submodules: true
  fetchDepth: 10

- task: NuGetToolInstaller@1

- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    packageType: sdk
    version: 5.0.203
    installationPath: $(Agent.ToolsDirectory)/dotnet

- task: DotNetCoreCLI@2
  displayName: 'restore nuget'
  inputs:
    command: 'restore'
    projects: '$(projectAPI)'
    
- task: DotNetCoreCLI@2
  displayName: 'restore nuget'
  inputs:
    command: 'restore'
    projects: '$(projectCLI)'


- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    projects: '$(projectAPI)'
    arguments: '--configuration Release --force /property:Version=%ENETVER%'
    
- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    projects: '$(projectCLI)'
    arguments: '--configuration Release --force /property:Version=%ENETVER%'

- task: DotNetCoreCLI@2
  inputs:
    command: 'pack'
    packagesToPack: '$(projectAPI)'
    configuration: 'Release'
    versioningScheme: 'off'
    buildProperties: 'Version=%ENETVER%'

- task: DotNetCoreCLI@2
  inputs:
    command: 'pack'
    packagesToPack: '$(projectCLI)'
    configuration: 'Release'
    versioningScheme: 'off'
    buildProperties: 'Version=%ENETVER%'
Set up CI with Azure Pipelines
Set up CI with Azure Pipelines

[skip ci]