Skip to content

Commit 05555f7

Browse files
committed
Generate full changelog and store as latest release
1 parent 5a44f07 commit 05555f7

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/changelog.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ permissions:
44

55
on:
66
push:
7+
branches: ['main']
78
tags:
89
- '[0-9]+.[0-9]+.[0-9]+'
910

@@ -20,8 +21,9 @@ jobs:
2021
with:
2122
fetch-depth: 0
2223

23-
- name: Generate a changelog
24+
- name: Generate changelog for tag
2425
uses: orhun/git-cliff-action@main
26+
if: startsWith(github.ref, 'refs/tags/')
2527
id: git-cliff
2628
with:
2729
config: cliff.toml
@@ -31,5 +33,20 @@ jobs:
3133
uses: softprops/action-gh-release@v2
3234
if: startsWith(github.ref, 'refs/tags/')
3335
with:
34-
make_latest: true
36+
make_latest: false
3537
body_path: ${{ steps.git-cliff.outputs.changelog }}
38+
39+
- name: Generate entire changelog
40+
uses: orhun/git-cliff-action@main
41+
id: git-cliff-all
42+
with:
43+
config: cliff.toml
44+
args: --strip all -v --github-repo ${{ github.repository }}
45+
46+
- name: Create Github release
47+
uses: softprops/action-gh-release@v2
48+
with:
49+
name: latest
50+
tag_name: latest
51+
make_latest: true
52+
body_path: ${{ steps.git-cliff-all.outputs.changelog }}

0 commit comments

Comments
 (0)