Skip to content

Commit cc25451

Browse files
committed
Work CI-CD
- Update github publish task. - Remove build on tags. - Update config to use windows-latest.
1 parent 82dda5a commit cc25451

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

azure-pipelines.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ trigger:
2020
- config/*
2121
- .github/*
2222

23-
tags:
24-
include:
25-
- v*
26-
2723
# PR always trigger build
2824
pr:
2925
autoCancel: true
@@ -41,7 +37,7 @@ jobs:
4137
##############################
4238
- job: Get_Build_Flags
4339
pool:
44-
vmImage: 'windows-2022'
40+
vmImage: 'windows-latest'
4541

4642
steps:
4743
- checkout: self
@@ -107,7 +103,7 @@ jobs:
107103
- Get_Build_Flags
108104

109105
pool:
110-
vmImage: 'windows-2022'
106+
vmImage: 'windows-latest'
111107

112108
variables:
113109
DOTNET_NOLOGO: true
@@ -251,6 +247,11 @@ jobs:
251247
ArtifactName: deployables
252248
ArtifactType: Container
253249

250+
# set cloud build vars again as they've been overriten by the tests run
251+
- script: nbgv cloud -a -c
252+
condition: succeeded()
253+
displayName: Set build number
254+
254255
# push NuGet packages to Azure Artifacts feed (always happens except on PR builds)
255256
- task: NuGetCommand@2
256257
displayName: Push NuGet packages to Azure Artifacts
@@ -269,20 +270,28 @@ jobs:
269270
and(
270271
succeeded(),
271272
eq(variables['System.PullRequest.PullRequestId'], ''),
272-
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
273+
startsWith(variables['Build.SourceBranch'], 'refs/heads/develop'),
274+
eq(variables['UPDATE_DEPENDENTS'], 'false')
273275
)
274276
displayName: Create/Update GitHub release
275277
inputs:
278+
action: edit
276279
gitHubConnection: 'github.com_nano-$(System.TeamProject)'
277280
tagSource: userSpecifiedTag
278-
tag: v$(GitBuildVersionSimple)
279-
title: 'nanoFramework Metadata Processor v$(GitBuildVersionSimple)'
280-
releaseNotesSource: inline
281-
releaseNotesInline: 'add description here'
281+
tag: v$(NBGV_NuGetPackageVersion)
282+
title: 'nanoFramework Metadata Processor v$(NBGV_NuGetPackageVersion)'
282283
assets: '$(Build.ArtifactStagingDirectory)/*'
283-
assetUploadMode: replace
284284
isPreRelease: false
285-
addChangeLog: false
285+
isDraft: false
286+
addChangeLog: true
287+
changeLogLabels: |
288+
[
289+
{ "label" : "Type: bug", "displayName" : "Bugs fixed", "state" : "closed" },
290+
{ "label" : "Type: enhancement", "displayName" : "Enhancements and new features", "state" : "closed" },
291+
{ "label" : "Breaking-Change", "displayName" : "Breaking Changes", "state" : "closed" }
292+
{ "label" : "Type: dependencies", "displayName" : "Dependencies updated", "state" : "closed" },
293+
{ "label" : "Type: documentation", "displayName" : "Documentation", "state" : "closed" }
294+
]
286295
287296
##############################
288297
- job: Update_Dependents
@@ -300,7 +309,7 @@ jobs:
300309
- Build_MDP
301310

302311
pool:
303-
vmImage: 'windows-2022'
312+
vmImage: 'windows-latest'
304313

305314
variables:
306315
DOTNET_NOLOGO: true
@@ -334,7 +343,7 @@ jobs:
334343
condition: failed('Build_MDP')
335344

336345
pool:
337-
vmImage: 'windows-2022'
346+
vmImage: 'windows-latest'
338347

339348
steps:
340349

0 commit comments

Comments
 (0)