[CI] Use isPR parameter instead of the build reason on publishing nugets. (#15283)

This commit is contained in:
Manuel de la Pena 2022-06-18 11:51:31 -04:00 коммит произвёл GitHub
Родитель 42c1c66a14
Коммит ae115441f2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -96,6 +96,8 @@ steps:
workingDirectory: $(Build.ArtifactStagingDirectory)
- template: publish-nugets.yml
parameters:
isPR: ${{ parameters.isPR }}
# always upload no matter what, since if we are not signing we need the artifact in the pipeline
- task: PublishPipelineArtifact@1

Просмотреть файл

@ -1,9 +1,13 @@
# all steps that are required to publish the nugets
parameters:
- name: isPR
type: boolean
steps:
# do not publish on pull requets
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- ${{ if not(parameters.isPR) }}:
- task: NuGetCommand@2
displayName: 'Publish Nugets to dotnet-eng'
inputs: