@@ -260,18 +260,27 @@ jobs:
260260 ArtifactName : deployables
261261 ArtifactType : Container
262262
263- # push NuGet class lib package to NuGet (happens on all builds except PRs)
264- - task : NuGetCommand@2
263+ # push NuGet packages to NuGet (happens on all builds except PRs)
264+ - task : DotNetCoreCLI@2
265265 condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
266- displayName : Push NuGet packages to NuGet
267- continueOnError : true
266+ displayName : Push NuGet nanoff package to NuGet
268267 inputs :
269- command : push
270- nuGetFeedType : external
271- allowPackageConflicts : true
272- packagesToPush : ' $(Build.ArtifactStagingDirectory)/*.nupkg '
273- publishFeedCredentials : ' NuGet-nanoFirmwareFlasher '
268+ command : custom
269+ custom : nuget
270+ arguments : push $(Build.ArtifactStagingDirectory)/nanoff.$(NBGV_NuGetPackageVersion).nupkg --source https://api.nuget.org/v3/index.json --api-key $(API_KEY) --skip-duplicate --timeout 600
271+ env :
272+ API_KEY : $(NuGetToken)
274273
274+ - task : DotNetCoreCLI@2
275+ condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
276+ displayName : Push NuGet packages to NuGet
277+ inputs :
278+ command : custom
279+ custom : nuget
280+ arguments : push $(Build.ArtifactStagingDirectory)/nanoFramework.Tools.FirmwareFlasher.$(NBGV_NuGetPackageVersion).nupkg --source https://api.nuget.org/v3/index.json --api-key $(API_KEY) --skip-duplicate --timeout 600
281+ env :
282+ API_KEY : $(NuGetToken)
283+
275284 # create or update GitHub release
276285 - task : GithubRelease@1
277286 condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
@@ -283,8 +292,7 @@ jobs:
283292 title : ' nano firmware flasher v$(MY_NUGET_VERSION)'
284293 releaseNotesSource : inline
285294 releaseNotesInline : ' add description here'
286- assets : ' $(Build.ArtifactStagingDirectory)/*.nupkg'
287- assetUploadMode : replace
295+ assets : ' '
288296 isPreRelease : true
289297 addChangeLog : false
290298
@@ -299,8 +307,7 @@ jobs:
299307 title : ' nano firmware flasher v$(MY_NUGET_VERSION)'
300308 releaseNotesSource : inline
301309 releaseNotesInline : ' add description here'
302- assets : ' $(Build.ArtifactStagingDirectory)/*.nupkg'
303- assetUploadMode : replace
310+ assets : ' '
304311 isPreRelease : false
305312 addChangeLog : false
306313 action : edit
0 commit comments