@@ -2,11 +2,13 @@ trigger:
22 branches :
33 include : [main, develop, "release-*" ]
44 paths :
5- exclude : [README.md, LICENSE.md, NuGet.Config, .github_changelog_generator, .gitignore]
5+ exclude : [README.md, CHANGELOG.md, CODE_OF_CONDUCT.md, LICENSE.md, NuGet.Config, .github_changelog_generator, .gitignore]
66 tags :
77 include : ["v*"]
88
99# PR always trigger build
10+ pr :
11+ autoCancel : true
1012
1113# add nf-tools repo to resources (for Azure Pipelines templates)
1214resources :
2123
2224variables :
2325 DOTNET_NOLOGO : true
24- solution : ' **/* .sln'
26+ solution : ' nanoFramework.System.Net.Http .sln'
2527 buildPlatform : ' Any CPU'
2628 buildConfiguration : ' Release'
2729 nugetPackageName : ' nanoFramework.System.Net.Http'
@@ -49,66 +51,15 @@ steps:
4951
5052- template : azure-pipelines-templates/class-lib-publish.yml@templates
5153
52- # need to push remaining packages to NuGet individually because the template above can only push one package (happens on tag builds for any branch)
53- - task : NuGetCommand@2
54- inputs :
55- command : push
56- nuGetFeedType : external
57- allowPackageConflicts : true
58- packagesToPush :
59- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Client.$(MY_NUGET_VERSION).nupkg
60- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Client.$(MY_NUGET_VERSION).snupkg
61- publishFeedCredentials : ' AzureArtifacts-$(System.TeamProject)'
62- includeSymbols : true
63- condition : and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
64- continueOnError : true
65- displayName : Push "Client" variant NuGet package to Azure Artifacts
66-
67- - task : NuGetCommand@2
68- inputs :
69- command : push
70- nuGetFeedType : external
71- allowPackageConflicts : true
72- packagesToPush :
73- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Server.$(MY_NUGET_VERSION).nupkg
74- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Server.$(MY_NUGET_VERSION).snupkg
75- publishFeedCredentials : ' AzureArtifacts-$(System.TeamProject)'
76- includeSymbols : true
77- condition : and( succeeded(), ne( variables['StartReleaseCandidate'], true ) )
78- continueOnError : true
79- displayName : Push "Server" variant NuGet package to Azure Artifacts
80-
81- - task : NuGetCommand@2
82- inputs :
83- command : push
84- nuGetFeedType : external
85- allowPackageConflicts : true
86- packagesToPush :
87- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Client.$(MY_NUGET_VERSION).nupkg
88- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Client.$(MY_NUGET_VERSION).snupkg
89- publishFeedCredentials : ' NuGet-$(System.TeamProject)'
90- includeSymbols : true
91- condition : and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne( variables['StartReleaseCandidate'], true ) )
92- continueOnError : true
93- displayName : Push "Client" variant NuGet package to NuGet
94-
95- - task : NuGetCommand@2
96- inputs :
97- command : push
98- nuGetFeedType : external
99- allowPackageConflicts : true
100- packagesToPush :
101- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Server.$(MY_NUGET_VERSION).nupkg
102- $(Build.ArtifactStagingDirectory)/nanoFramework.System.Net.Http.Server.$(MY_NUGET_VERSION).snupkg
103- publishFeedCredentials : ' NuGet-$(System.TeamProject)'
104- includeSymbols : true
105- condition : and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne( variables['StartReleaseCandidate'], true ) )
106- continueOnError : true
107- displayName : Push "Server" variant NuGet package to NuGet
108-
10954# create or update GitHub release
11055- task : GithubRelease@1
111- condition : and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), ne( variables['StartReleaseCandidate'], true ) )
56+ condition : >-
57+ and(
58+ succeeded(),
59+ eq(variables['System.PullRequest.PullRequestId'], ''),
60+ not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')),
61+ eq(variables['StartReleaseCandidate'], false)
62+ )
11263 displayName : Create/Update GitHub PREVIEW release
11364 inputs :
11465 gitHubConnection : ' github.com_nano-$(System.TeamProject)'
@@ -124,7 +75,13 @@ steps:
12475
12576# create or update GitHub release ON tags from release or main branches
12677- task : GithubRelease@1
127- condition : and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), not(contains(variables['Build.SourceBranch'], 'preview') ), ne( variables['StartReleaseCandidate'], true ) )
78+ condition : >-
79+ and(
80+ succeeded(),
81+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
82+ not(contains(variables['Build.SourceBranch'], 'preview')),
83+ eq(variables['StartReleaseCandidate'], false)
84+ )
12885 displayName : Create/Update GitHub stable release
12986 inputs :
13087 action : edit
@@ -142,11 +99,24 @@ steps:
14299# update dependents
143100- task : UpdatenFDependencies@1
144101 displayName : Update dependent class libs
145- 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') )
102+ condition : >-
103+ or(
104+ and(
105+ succeeded(),
106+ startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
107+ eq(variables['StartReleaseCandidate'], 'false')),
108+ and(
109+ succeeded(),
110+ contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'),
111+ eq(variables['StartReleaseCandidate'], 'false')
112+ ),
113+ eq(variables['UPDATE_DEPENDENTS'], 'true')
114+ )
146115 inputs :
147116 gitHubToken : $(GitHubToken)
148117 repositoriesToUpdate : |
149118 nanoFramework.WebServer
119+ nanoFramework.Azure.Devices
150120
151121# step from template @ nf-tools repo
152122# report error
0 commit comments