Skip to content

Commit 4fcc3fc

Browse files
committed
Work CI-CD
- Add github action to generate changelog. - Remove private feed from nuget config. - Fix AZDO trigger list. - Fix AZDO variables. ***NO_CI***
1 parent 21e2acc commit 4fcc3fc

File tree

4 files changed

+140
-16
lines changed

4 files changed

+140
-16
lines changed

.github/.changelog-config.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## New Features and enhancements",
5+
"labels": [
6+
"Type: enhancement"
7+
],
8+
"exhaustive": true
9+
},
10+
{
11+
"title": "## Bug Fixes",
12+
"labels": [
13+
"Type: bug"
14+
],
15+
"exhaustive": true
16+
},
17+
{
18+
"title": "## Documentation",
19+
"labels": [
20+
"Type: documentation"
21+
],
22+
"exhaustive": true
23+
},
24+
{
25+
"title": "## ⚠️ Breaking Changes",
26+
"labels": [
27+
"Breaking-Change"
28+
],
29+
"exhaustive": true
30+
},
31+
{
32+
"title": "## Updated dependencies",
33+
"labels": [
34+
"Type: dependencies"
35+
],
36+
"exhaustive": true
37+
}
38+
],
39+
"sort": "ASC",
40+
"template": "${{CHANGELOG}}\n\n**Full Changelog:** ${{RELEASE_DIFF}}\n\nThe following NuGet package is available from this release:\n\n:package: [System.Device.Gpio](https://www.nuget.org/packages/nanoFramework.System.Device.Gpio/)",
41+
"pr_template": "* ${{TITLE}} by @${{AUTHOR}} in #${{NUMBER}}",
42+
"empty_template": "- no changes",
43+
"max_tags_to_fetch": 200,
44+
"max_pull_requests": 200
45+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) .NET Foundation and Contributors
2+
# See LICENSE file in the project root for full license information.
3+
4+
name: Generate Changelog
5+
run-name: Generate changelog
6+
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
12+
jobs:
13+
compose_changelog:
14+
name: nanoFramework
15+
uses: nanoframework/nf-tools/.github/workflows/generate-changelog.yml@main
16+
secrets: inherit

NuGet.Config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
<configuration>
33
<packageSources>
44
<add key="NuGet" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5-
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
65
</packageSources>
76
</configuration>

azure-pipelines.yml

Lines changed: 79 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@ trigger:
99
- release-*
1010
paths:
1111
exclude:
12-
- .github_changelog_generator
1312
- .gitignore
1413
- CHANGELOG.md
15-
- CODE_OF_CONDUCT.md
1614
- LICENSE.md
1715
- README.md
1816
- NuGet.Config
1917
- assets/*
20-
- config/*
2118
- .github/*
2219

23-
tags:
24-
include:
25-
- v*
26-
2720
# PR always trigger build
2821
pr:
2922
autoCancel: true
@@ -52,7 +45,18 @@ variables:
5245
- name: nugetPackageName
5346
value: 'nanoFramework.System.Device.Gpio'
5447

55-
steps:
48+
variables:
49+
- group: sign-client-credentials
50+
- name: DOTNET_NOLOGO
51+
value: true
52+
- name: buildPlatform
53+
value: 'Any CPU'
54+
- name: buildConfiguration
55+
value: 'Release'
56+
- name: solution
57+
value: 'nanoFramework.System.Device.Gpio.sln'
58+
- name: nugetPackageName
59+
value: 'nanoFramework.System.Device.Gpio'
5660

5761
# step from template @ nf-tools repo
5862
# all build, update and publish steps
@@ -70,10 +74,70 @@ steps:
7074
repositoriesToUpdate: |
7175
System.Device.Spi
7276
73-
# step from template @ nf-tools repo
74-
# report error
75-
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
76-
parameters:
77-
status: 'failure'
78-
webhookUrl: '$(DiscordWebhook)'
79-
message: ''
77+
##############################
78+
- job: Update_Dependents
79+
condition: >-
80+
or(
81+
and(
82+
succeeded(),
83+
startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
84+
eq(variables['StartReleaseCandidate'], 'false')
85+
),
86+
and(
87+
succeeded(),
88+
contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'),
89+
eq(variables['StartReleaseCandidate'], 'false')
90+
),
91+
eq(variables['UPDATE_DEPENDENTS'], 'true')
92+
)
93+
94+
dependsOn:
95+
- Build_Library
96+
97+
pool:
98+
vmImage: 'windows-latest'
99+
100+
variables:
101+
DOTNET_NOLOGO: true
102+
103+
steps:
104+
105+
- checkout: none
106+
107+
# update dependents
108+
- template: azure-pipelines-templates/update-dependents.yml@templates
109+
parameters:
110+
${{ if eq(variables['UPDATE_DEPENDENTS'], 'true') }}:
111+
waitBeforeUpdate: false
112+
${{ else }}:
113+
waitBeforeUpdate: true
114+
repositoriesToUpdate: |
115+
System.Device.Spi
116+
117+
##################################
118+
# report build failure to Discord
119+
- job: Report_Build_Failure
120+
121+
dependsOn:
122+
- Build_Library
123+
- Update_Dependents
124+
condition: >-
125+
or(
126+
failed('Build_Library'),
127+
failed('Update_Dependents')
128+
)
129+
130+
pool:
131+
vmImage: 'windows-latest'
132+
133+
steps:
134+
135+
- checkout: self
136+
137+
# step from template @ nf-tools repo
138+
# report error
139+
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
140+
parameters:
141+
status: 'failure'
142+
webhookUrl: '$(DiscordWebhook)'
143+
message: ''

0 commit comments

Comments
 (0)