@@ -17,6 +17,10 @@ trigger:
17
17
- config/*
18
18
- .github/*
19
19
20
+ tags :
21
+ include :
22
+ - v*
23
+
20
24
# PR always trigger build
21
25
pr :
22
26
autoCancel : true
@@ -29,6 +33,12 @@ resources:
29
33
name : nanoframework/nf-tools
30
34
endpoint : nanoframework
31
35
36
+ variables :
37
+ - name : DOTNET_NOLOGO
38
+ value : true
39
+ - name : nugetPackageName
40
+ value : ' nanoFramework.Tools.MetadataProcessor.MsBuildTask'
41
+
32
42
jobs :
33
43
34
44
# #############################
@@ -94,7 +104,11 @@ jobs:
94
104
# #############################
95
105
# build MDP
96
106
- job : Build_MDP
97
- condition : eq(variables['UPDATE_DEPENDENTS'], 'false')
107
+ condition :
108
+ and(
109
+ not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')),
110
+ eq(variables['UPDATE_DEPENDENTS'], 'false')
111
+ )
98
112
99
113
dependsOn :
100
114
- Get_Build_Flags
@@ -104,8 +118,6 @@ jobs:
104
118
105
119
variables :
106
120
- group : sign-client-credentials
107
- - name : DOTNET_NOLOGO
108
- value : true
109
121
- name : buildPlatform
110
122
value : ' Any CPU'
111
123
- name : buildConfiguration
@@ -249,7 +261,6 @@ jobs:
249
261
.\sign code azure-key-vault `
250
262
"**/*.nupkg" `
251
263
--base-directory "$(Build.ArtifactStagingDirectory)" `
252
- --file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
253
264
--description ".NET nanoFramework MDP" `
254
265
--description-url "https://github.com/$env:Build_Repository_Name" `
255
266
--azure-key-vault-tenant-id "$(SignTenantId)" `
@@ -322,16 +333,9 @@ jobs:
322
333
# #############################
323
334
- job : Update_Dependents
324
335
condition : >-
325
- and(
326
- or(
327
- succeeded('Build_MDP'),
328
- not(in(dependencies.PreviousJob.result, 'Succeeded', 'Failed', 'Canceled'))
329
- ),
330
- or(
331
- eq(dependencies.Get_Build_Flags.outputs['GetPRLabels.RUN_UPDATE_DEPENDENTS'], 'true'),
332
- eq(variables['UPDATE_DEPENDENTS'], 'true')
333
- ),
334
- not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
336
+ or(
337
+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
338
+ eq(variables['UPDATE_DEPENDENTS'], 'true')
335
339
)
336
340
337
341
dependsOn :
@@ -341,25 +345,17 @@ jobs:
341
345
pool :
342
346
vmImage : ' windows-latest'
343
347
344
- variables :
345
- DOTNET_NOLOGO : true
346
-
347
348
steps :
348
349
# need this here in order to persist GitHub credentials
349
350
- checkout : self
350
351
fetchDepth : 1
351
-
352
- # Conditional delay step
353
- - powershell : |
354
- if ($env:BUILD_MDP_RESULT -eq 'Succeeded') {
355
- Write-Host "Build_MDP succeeded, waiting for 10 minutes for the NuGet package to be processed before starting the job..."
356
- Start-Sleep -Seconds 600
357
- }
358
- displayName: 'Waiting for NuGet being published'
359
- env:
360
- BUILD_MDP_RESULT: $(Build.MDP.result)
361
352
362
- - template : azure-pipelines-templates/install-nuget.yml@templates
353
+ # update dependents
354
+ # use this to make sure nuget package is published
355
+ - template : azure-pipelines-templates/update-dependents.yml@templates
356
+ parameters :
357
+ packageName : ' $(nugetPackageName)'
358
+ repositoriesToUpdate :
363
359
364
360
# update dependencies
365
361
- task : PowerShell@2
0 commit comments