Skip to content

Commit d3ba2f5

Browse files
committed
build: use git-cliff for changelog
1 parent 79974c8 commit d3ba2f5

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,31 @@ jobs:
6363
NUGET_SOURCE: https://api.nuget.org/v3/index.json
6464
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
6565

66-
- uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # v1.2.1
66+
gh-release:
67+
needs:
68+
- release
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: write
72+
steps:
73+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74+
with:
75+
fetch-depth: 0 # Important for changelog
76+
filter: blob:none
77+
show-progress: false
78+
79+
- name: prepare version
80+
run: echo VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_ENV # trim leading 'v' from tag name
81+
82+
- name: Generate changelog with git-cliff
83+
uses: tj-actions/git-cliff@75599f745633e29f99bd9e14a30865b7d2fcbe84 # v1.5.0
84+
with:
85+
args: --latest --strip all
86+
output: "CHANGELOG.md"
87+
88+
- name: Create Release
89+
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
6790
with:
68-
repo_token: ${{ secrets.GITHUB_TOKEN }}
91+
bodyFile: "CHANGELOG.md"
92+
name: ${{ env.VERSION }}
6993
prerelease: ${{ contains(github.ref_name, '-') }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ _ReSharper*/
3131
*.orig
3232

3333
[Pp]ackages/
34+
35+
# others
36+
/CHANGELOG.md

0 commit comments

Comments
 (0)