@@ -2,11 +2,13 @@ trigger:
2
2
branches :
3
3
include : [main, develop, "release-*" ]
4
4
paths :
5
- exclude : [README.md, LICENSE.md, NuGet.Config, .github_changelog_generator, .gitignore]
5
+ exclude : [README.md, LICENSE.md, CHANGELOG.md, CODE_OF_CONDUCT.md, NuGet.Config, .github_changelog_generator, .gitignore]
6
6
tags :
7
7
include : ["v*"]
8
8
9
9
# PR always trigger build
10
+ pr :
11
+ autoCancel : true
10
12
11
13
# add nf-tools repo to resources (for Azure Pipelines templates)
12
14
resources :
26
28
27
29
variables :
28
30
DOTNET_NOLOGO : true
29
- solution : ' **/* .sln'
31
+ solution : ' nanoFramework.CoreLibrary .sln'
30
32
buildPlatform : ' Any CPU'
31
33
buildConfiguration : ' Release'
32
34
nugetPackageName : ' nanoFramework.CoreLibrary'
76
78
77
79
# need to push the other package to NuGet because the template above can only push one package (happens on all builds except PRs)
78
80
- task : NuGetCommand@2
79
- condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), eq( variables['StartReleaseCandidate'], false ) )
81
+ condition : >-
82
+ and(
83
+ succeeded(),
84
+ eq(variables['System.PullRequest.PullRequestId'], ''),
85
+ eq(variables['StartReleaseCandidate'], false)
86
+ )
80
87
displayName : Push "NoReflection" variant NuGet package to Azure Artifacts
81
88
inputs :
82
89
command : push
88
95
continueOnError : true
89
96
90
97
- task : NuGetCommand@2
91
- condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), eq( variables['StartReleaseCandidate'], false ) )
98
+ condition : >-
99
+ and(
100
+ succeeded(),
101
+ eq(variables['System.PullRequest.PullRequestId'], ''),
102
+ eq(variables['StartReleaseCandidate'], false)
103
+ )
92
104
displayName : Push "NoReflection" variant NuGet package to Azure Artifacts
93
105
inputs :
94
106
command : push
@@ -101,7 +113,13 @@ jobs:
101
113
102
114
# create or update GitHub release
103
115
- task : GithubRelease@1
104
- condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), ne( variables['StartReleaseCandidate'], true ) )
116
+ condition : >-
117
+ and(
118
+ succeeded(),
119
+ eq(variables['System.PullRequest.PullRequestId'], ''),
120
+ not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')),
121
+ ne(variables['StartReleaseCandidate'], true)
122
+ )
105
123
displayName : Create/Update GitHub PREVIEW release
106
124
inputs :
107
125
gitHubConnection : ' github.com_nano-$(System.TeamProject)'
@@ -117,7 +135,13 @@ jobs:
117
135
118
136
# create or update GitHub release ON tags from release or master branches
119
137
- task : GithubRelease@1
120
- condition : and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), not(contains(variables['Build.SourceBranch'], 'preview') ), ne( variables['StartReleaseCandidate'], true ) )
138
+ condition : >-
139
+ and(
140
+ succeeded(),
141
+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
142
+ not(contains(variables['Build.SourceBranch'], 'preview')),
143
+ ne(variables['StartReleaseCandidate'], true)
144
+ )
121
145
displayName : Create/Update GitHub stable release
122
146
inputs :
123
147
gitHubConnection : ' github.com_nano-$(System.TeamProject)'
@@ -133,7 +157,20 @@ jobs:
133
157
134
158
# #############################
135
159
- job : Update_Dependents
136
- condition : or( and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['StartReleaseCandidate'], 'false') ), and( succeeded(), contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'), eq(variables['StartReleaseCandidate'], 'false') ), eq(variables['UPDATE_DEPENDENTS'], 'true') )
160
+ condition : >-
161
+ or(
162
+ and(
163
+ succeeded(),
164
+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
165
+ eq(variables['StartReleaseCandidate'], 'false')
166
+ ),
167
+ and(
168
+ succeeded(),
169
+ contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'),
170
+ eq(variables['StartReleaseCandidate'], 'false')
171
+ ),
172
+ eq(variables['UPDATE_DEPENDENTS'], 'true')
173
+ )
137
174
138
175
dependsOn :
139
176
- Build_mscorlib
@@ -190,7 +227,12 @@ jobs:
190
227
dependsOn :
191
228
- Build_mscorlib
192
229
- Update_Dependents
193
- condition : or( failed('Build_mscorlib'), failed('Build_mscorlib_no_reflection'), failed('Update_Dependents'))
230
+ condition : >-
231
+ or(
232
+ failed('Build_mscorlib'),
233
+ failed('Build_mscorlib_no_reflection'),
234
+ failed('Update_Dependents')
235
+ )
194
236
195
237
pool :
196
238
vmImage : ' windows-2019'
0 commit comments