# template-publish-packages-and-symbols.yaml
# Publishes all nuget packages and symbols to appropriate destinations.

parameters:
  NugetPackagesWildcard: '$(Build.ArtifactStagingDirectory)\packages\*.nupkg'
  ArtifactPublishPath: '$(Build.ArtifactStagingDirectory)\packages'
  SymbolPublishWildcard: '**/bin/**/microsoft.identity.client.*'
  DropArtifactName: 'packages'

steps:
- task: NuGetCommand@2
  displayName: 'Verify packages are signed'
  inputs:
    command: custom
    arguments: 'verify -Signature ${{ parameters.NugetPackagesWildcard }}'
  continueOnError: true

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact: packages'
  inputs:
    PathtoPublish: '${{ parameters.ArtifactPublishPath }}'
    ArtifactName: ${{ parameters.DropArtifactName }}''

- task: NuGetCommand@2
  displayName: 'Publish packages to MyGet'
  inputs:
    command: push
    packagesToPush: '${{ parameters.NugetPackagesWildcard }}'
    nuGetFeedType: external
    publishFeedCredentials: 'Wilson MyGet feed'
  continueOnError: true

- task: NuGetCommand@2
  displayName: 'Publish packages to VSTS feed'
  inputs:
    command: push
    packagesToPush: '${{ parameters.NugetPackagesWildcard }}'
    publishVstsFeed: '46419298-b96c-437f-bd4c-12c8df7f868d'
    allowPackageConflicts: true
  continueOnError: true

- task: PublishSymbols@2
  displayName: 'Publish symbols'
  inputs:
    SearchPattern: '${{ parameters.SymbolPublishWildcard }}'
    IndexSources: false
    SymbolServerType: TeamServices

# template-publish-packages-and-symbols.yaml
# Publishes all nuget packages and symbols to appropriate destinations.

parameters:
  NugetPackagesWildcard: '$(Build.ArtifactStagingDirectory)\packages\*.nupkg'
  ArtifactPublishPath: '$(Build.ArtifactStagingDirectory)\packages'
  SymbolPublishWildcard: '**/bin/**/microsoft.identity.client.*'
  DropArtifactName: 'packages'

steps:
- task: NuGetCommand@2
  displayName: 'Verify packages are signed'
  inputs:
    command: custom
    arguments: 'verify -Signature ${{ parameters.NugetPackagesWildcard }}'
  continueOnError: true

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact: packages'
  inputs:
    PathtoPublish: '${{ parameters.ArtifactPublishPath }}'
    ArtifactName: ${{ parameters.DropArtifactName }}''

- task: NuGetCommand@2
  displayName: 'Publish packages to VSTS feed'
  inputs:
    command: push
    packagesToPush: '${{ parameters.NugetPackagesWildcard }}'
    publishVstsFeed: '46419298-b96c-437f-bd4c-12c8df7f868d'
    allowPackageConflicts: true
  continueOnError: true

- task: PublishSymbols@2
  displayName: 'Publish symbols'
  inputs:
    SearchPattern: '${{ parameters.SymbolPublishWildcard }}'
    IndexSources: false
    SymbolServerType: TeamServices

Remove myget step from builds
Remove myget step from builds
