Skip to content

Commit

Permalink
Merged PR 22: Fix publish template
Browse files Browse the repository at this point in the history
Fix publish template
  • Loading branch information
adityapatwardhan committed May 19, 2021
1 parent cb325a9 commit c4762f3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/releaseBuild/template/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:

stages:
- stage: ${{ parameters.stageName }}
displayName: Release Microsoft.PowerShell.Pager to '${{ parameters.stageName }}'
displayName: Release platyPS to '${{ parameters.stageName }}'
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/v2'))

jobs:
Expand All @@ -23,21 +23,21 @@ stages:
artifact: nuget

- pwsh: |
Get-ChildItem -Recurse "$(Pipeline.Workspace)/nuget"
$package = (Get-ChildItem "$(Pipeline.Workspace)/nuget/platyPS.*.nupkg").FullName
$package
$vstsCommandString = "vso[task.setvariable variable=NugetPkgPath]${package}"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: Capture downloaded artifact
- task: NuGetAuthenticate@0
condition: ne('${{ parameters.feedUrl }}', '')

- pwsh: |
nuget push -ApiKey AzureArtifacts -source '${{ parameters.feedUrl }}' '$(NugetPkgPath)'
displayName: Push to internal feed
condition: ne('${{ parameters.feedUrl }}', '')
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.PowerShell.Pager.*.nupkg'
packagesToPush: '$(NugetPkgPath)'
nuGetFeedType: external
publishFeedCredentials: ${{ parameters.feedCredential }}
condition: eq('${{ parameters.feedUrl }}', '')

0 comments on commit c4762f3

Please sign in to comment.