@@ -179,7 +179,8 @@ jobs:
179179 buildPlatform : ' x64'
180180 buildConfiguration : ' Release'
181181 solution : ' nanoFirmwareFlasher.sln'
182- run_update_dependents : dependencies.Check_Build_Options.outputs['BuildOptions.RUN_UPDATE_DEPENDENTS']
182+ run_update_dependents : $[dependencies.Check_Build_Options.outputs['BuildOptions.RUN_UPDATE_DEPENDENTS']]
183+ isTag : $[not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))]
183184
184185 steps :
185186
@@ -196,19 +197,31 @@ jobs:
196197
197198 - task : UseDotNet@2
198199 displayName : Install .NET SDK
199- condition : eq(variables['UPDATE_DEPENDENTS'], 'false')
200+ condition : >-
201+ and(
202+ eq(variables['isTag'], 'false'),
203+ eq(variables['UPDATE_DEPENDENTS'], 'false')
204+ )
200205 inputs :
201206 packageType : sdk
202207 version : 6.x
203208
204209 # only required when updating dependents
205210 - script : nbgv cloud -a -c
206- condition : eq(variables['UPDATE_DEPENDENTS'], 'true')
211+ condition : >-
212+ and(
213+ eq(variables['isTag'], 'false'),
214+ eq(variables['UPDATE_DEPENDENTS'], 'false')
215+ )
207216 displayName : Set Could Version
208217
209218 - task : DotNetCoreCLI@2
210219 displayName : Restore NuGet packages
211- condition : eq(variables['UPDATE_DEPENDENTS'], 'false')
220+ condition : >-
221+ and(
222+ eq(variables['isTag'], 'false'),
223+ eq(variables['UPDATE_DEPENDENTS'], 'false')
224+ )
212225 inputs :
213226 command : restore
214227 verbosityRestore : minimal
@@ -218,16 +231,25 @@ jobs:
218231
219232 - script : dotnet build -c $(BuildConfiguration) /p:PublicRelease=true --no-restore /t:build,pack
220233 displayName : Build NuGet package
221- condition : eq(variables['UPDATE_DEPENDENTS'], 'false')
234+ condition : >-
235+ and(
236+ eq(variables['isTag'], 'false'),
237+ eq(variables['UPDATE_DEPENDENTS'], 'false')
238+ )
222239
223240 - script : dotnet pack --runtime win-x64 -c $(BuildConfiguration) -p:PublicRelease=true -p:PackGlobalTool=true --no-restore
224241 displayName : Build .NET Core Tool NuGet package
225- condition : eq(variables['UPDATE_DEPENDENTS'], 'false')
242+ condition : >-
243+ and(
244+ eq(variables['isTag'], 'false'),
245+ eq(variables['UPDATE_DEPENDENTS'], 'false')
246+ )
226247
227248 - task : PowerShell@2
228249 condition : >-
229250 and(
230251 succeeded(),
252+ eq(variables['isTag'], 'false'),
231253 eq(variables['UPDATE_DEPENDENTS'], 'false')
232254 )
233255 displayName : Get NuGet build number
@@ -252,6 +274,7 @@ jobs:
252274 and(
253275 succeeded(),
254276 ne(variables['system.pullrequest.isfork'], true),
277+ eq(variables['isTag'], 'false'),
255278 eq(variables['UPDATE_DEPENDENTS'], 'false')
256279 )
257280 displayName : Update cloud build number
@@ -280,12 +303,17 @@ jobs:
280303 }
281304
282305 displayName: set release draft var
283- condition: eq(variables['UPDATE_DEPENDENTS'], 'false')
306+ condition: >-
307+ and(
308+ eq(variables['isTag'], 'false'),
309+ eq(variables['UPDATE_DEPENDENTS'], 'false')
310+ )
284311
285312 - task : CopyFiles@1
286313 condition : >-
287314 and(
288315 succeeded(),
316+ eq(variables['isTag'], 'false'),
289317 eq(variables['UPDATE_DEPENDENTS'], 'false')
290318 )
291319 displayName : Collecting deployable artifacts
@@ -302,6 +330,7 @@ jobs:
302330 and(
303331 succeeded(),
304332 eq(variables['System.PullRequest.PullRequestId'], ''),
333+ eq(variables['isTag'], 'false'),
305334 eq(variables['UPDATE_DEPENDENTS'], 'false')
306335 )
307336 inputs :
@@ -326,14 +355,15 @@ jobs:
326355 and(
327356 succeeded(),
328357 eq(variables['System.PullRequest.PullRequestId'], ''),
358+ eq(variables['isTag'], 'false'),
329359 eq(variables['UPDATE_DEPENDENTS'], 'false')
330360 )
331-
332361 # publish artifacts
333362 - task : PublishBuildArtifacts@1
334363 condition : >-
335364 and(
336365 succeeded(),
366+ eq(variables['isTag'], 'false'),
337367 eq(variables['UPDATE_DEPENDENTS'], 'false')
338368 )
339369 displayName : Publish deployables artifacts
@@ -348,7 +378,7 @@ jobs:
348378 and(
349379 succeeded(),
350380 eq(variables['System.PullRequest.PullRequestId'], ''),
351- not(startsWith( variables['Build.SourceBranch '], 'refs/tags/v') ),
381+ eq( variables['isTag '], 'false' ),
352382 eq(variables['UPDATE_DEPENDENTS'], 'false')
353383 )
354384 displayName : Push nanoff NuGet package to NuGet
@@ -367,7 +397,7 @@ jobs:
367397 and(
368398 succeeded(),
369399 eq(variables['System.PullRequest.PullRequestId'], ''),
370- not(startsWith( variables['Build.SourceBranch '], 'refs/tags/v') ),
400+ eq( variables['isTag '], 'false' ),
371401 eq(variables['UPDATE_DEPENDENTS'], 'false')
372402 )
373403 displayName : Push library NuGet package to NuGet
@@ -385,7 +415,7 @@ jobs:
385415 condition : >-
386416 and(
387417 succeeded(),
388- not(startsWith( variables['Build.SourceBranch '], 'refs/tags/v') ),
418+ eq( variables['isTag '], 'false' ),
389419 eq(variables['System.PullRequest.PullRequestId'], ''),
390420 eq(variables['UPDATE_DEPENDENTS'], 'false')
391421 )
@@ -400,7 +430,6 @@ jobs:
400430 action : create
401431 isDraft : false
402432 addChangeLog : true
403- changeLogType : issueBased
404433 changeLogLabels : |
405434 [
406435 { "label" : "Type: bug", "displayName" : "Bugs fixed", "state" : "closed" },
@@ -413,19 +442,17 @@ jobs:
413442 # update dependencies
414443 - task : PowerShell@2
415444 condition : >-
416- and(
417- or(
418- eq(variables['UPDATE_DEPENDENTS'], 'true'),
419- eq(variables['run_update_dependents'], 'true')
420- ),
421- not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
445+ or(
446+ eq(variables['UPDATE_DEPENDENTS'], 'true'),
447+ eq(variables['run_update_dependents'], 'true'),
448+ eq(variables['isTag'], 'true')
422449 )
423450 displayName : Update dependent tools
424451 inputs :
425452 targetType : filePath
426- filePath : azure-pipelines/update-dependencies .ps1
453+ filePath : azure-pipelines/update-dependents .ps1
427454 env :
428- MY_GITHUB_TOKEN : $(GitHubToken)
455+ GH_TOKEN : $(GitHubToken)
429456
430457# #################################
431458# report build failure to Discord
0 commit comments