Skip to content

Commit fe15e46

Browse files
ci: ensure proper changelog generation
Signed-off-by: Mateusz Urbanek <[email protected]>
1 parent 781f123 commit fe15e46

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/release.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ jobs:
2222
if: startsWith(github.ref, 'refs/tags/')
2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Capture latest tag if exists
28+
uses: actions-ecosystem/action-get-latest-tag@v1
29+
id: get-latest-tag
30+
with:
31+
semver_only: true
32+
with_initial_version: true
33+
initial_version: v0.0.0
34+
- id: previous
35+
run: |
36+
echo tag="$(git tag -l 'v*' | grep -v '${{ steps.get-latest-tag.outputs.tag }}' | tail -n 1)" >> "$GITHUB_OUTPUT"
2537
- id: semver_parser
2638
uses: release-kit/semver@v2
2739
with:
@@ -30,7 +42,8 @@ jobs:
3042
uses: requarks/changelog-action@v1
3143
with:
3244
token: ${{ github.token }}
33-
tag: ${{ github.ref_name }}
45+
toTag: ${{ steps.previous.outputs.tag }}
46+
fromTag: ${{ github.ref_name }}
3447
excludeTypes: ""
3548
excludeScopes: ""
3649
- uses: ncipollo/[email protected]

0 commit comments

Comments
 (0)