# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

name: Build Reference Nuget Packages

trigger:
- develop

pool:
  vmImage: ubuntu-latest

steps:
- task: DotNetCoreCLI@2
  inputs:
    command: restore
    projects: |
      **/Hypermedia.MediaTypes.csproj
      **/Hypermedia.Relations.csproj
- task: DotNetCoreCLI@2
  displayName: Build Projects
  inputs:
    command: build
    projects: |
      **/Hypermedia.MediaTypes.csproj
      **/Hypermedia.Relations.csproj
    arguments: --configuration $(BuildConfiguration) 

- task: DotNetCoreCLI@2
  displayName: Package Hypermedia.MediaTypes
  inputs:
    command: pack
    projects: Source/Hypermedia.MediaTypes/Hypermedia.MediaTypes.csproj
    configuration: $(BuildConfiguration)
    nobuild: true
    packDirectory: $(Build.ArtifactStagingDirectory)/MediaTypes

- task: DotNetCoreCLI@2
  displayName: Package Hypermedia.Relations
  inputs:
    command: pack
    projects: Source/Hypermedia.Relations/Hypermedia.Relations.csproj
    configuration: $(BuildConfiguration)
    nobuild: true
    packDirectory: $(Build.ArtifactStagingDirectory)/Relations

- publish: $(Build.ArtifactStagingDirectory)/MediaTypes
  artifact: Hypermedia.MediaTypes

- publish: $(Build.ArtifactStagingDirectory)/Relations
  artifact: Hypermedia.Relations

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

[skip ci]