Skip to content

Commit c35a402

Browse files
committed
Work CI-CD
- Add gitub action to generate change log in github release. ***NO_CI***
1 parent 1a81baa commit c35a402

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
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\n<h4>Install from nuget.org</h4>\nThe following NuGet package is available from this release:\n\n:package: [nanoFramework.AtomLite](https://www.nuget.org/packages/nanoFramework.AtomLite/)\n:package: [nanoFramework.AtomMatrix](https://www.nuget.org/packages/nanoFramework.AtomMatrix/)\n:package: [nanoFramework.CoreInk](https://www.nuget.org/packages/nanoFramework.CoreInk/)\n:package: [nanoFramework.Fire](https://www.nuget.org/packages/nanoFramework.Fire/)\n:package: [nanoFramework.M5Core](https://www.nuget.org/packages/nanoFramework.M5Stack/)\n:package: [nanoFramework.M5Core2](https://www.nuget.org/packages/nanoFramework.M5Core2/)\n:package: [nanoFramework.M5Stick](https://www.nuget.org/packages/nanoFramework.M5StickC/)\n:package: [nanoFramework.M5StickCPlus](https://www.nuget.org/packages/nanoFramework.M5StickCPlus/)\n:package: [nanoFramework.Tough](https://www.nuget.org/packages/nanoFramework.Tough/)",
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: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright (c) .NET Foundation and Contributors
2+
# See LICENSE file in the project root for full license information.
3+
4+
name: 'Build changelog'
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
repository_dispatch:
10+
types: generate-changelog
11+
12+
jobs:
13+
compose_changelog:
14+
if: startsWith(github.ref, 'refs/tags/v')
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Get previous release
24+
id: previous_release
25+
run: |
26+
$tags=git tag --sort=committerdate --list v*
27+
$previousTag = $tags[$tags.Count - 2]
28+
echo "PREVIOUS_TAG=$previousTag" >> $env:GITHUB_ENV
29+
shell: pwsh
30+
31+
- name: Build Changelog
32+
id: build_changelog
33+
uses: mikepenz/release-changelog-builder-action@v5
34+
with:
35+
configuration: '.github/.changelog-config.json'
36+
fromTag: ${{ env.PREVIOUS_TAG }}
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Update changelog in release
41+
id: update_release
42+
uses: tubone24/[email protected]
43+
env:
44+
GITHUB_TOKEN: ${{ github.token }}
45+
TAG_NAME: ${{steps.build_changelog.outputs.toTag}}
46+
with:
47+
body: ${{ steps.build_changelog.outputs.changelog }}

0 commit comments

Comments
 (0)