[CI] Use isPR parameter instead of the build reason on publishing nugets. (#15283)
This commit is contained in:
Родитель
42c1c66a14
Коммит
ae115441f2
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче