Skip to content

Commit 9975270

Browse files
committed
Ensure nuget publish only occurs if packages are generated
1 parent a918534 commit 9975270

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

build/azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,14 @@ steps:
208208

209209
- script: nuget push -Source GitHub -ConfigFile %NUGET_CONFIG% -SkipDuplicate "%PACKAGES_DIR%\*.nupkg"
210210
displayName: Push Nuget Packages to $(GITHUB_PACKAGES)
211+
condition: and(succeeded(), ne(variables['package_count'],0))
211212
env:
212213
PACKAGES_DIR: $(Build.ArtifactStagingDirectory)
213214
NUGET_CONFIG: $(Build.ArtifactStagingDirectory)\nuget.publish.config
214215

215216
- task: NuGetCommand@2
216217
displayName: Push Nuget Packages to nuget.org
218+
condition: and(succeeded(), ne(variables['package_count'],0))
217219
inputs:
218220
command: 'push'
219221
feedsToUse: 'config'

0 commit comments

Comments
 (0)