Skip to content

Commit 8df394b

Browse files
committed
ci: enhance changelog update step with previous tag reference
- Added step to retrieve the previous tag for more accurate changelog generation.
1 parent a709039 commit 8df394b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/main_test_release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,19 @@ jobs:
6666
git config --global user.name "MongoCamp CI"
6767
sbt ci-release
6868
69+
- name: Get previous tag
70+
id: previousTag
71+
run: |
72+
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
73+
echo "previousTag: $name"
74+
echo "previousTag=$name" >> $GITHUB_ENV
75+
6976
- name: Update CHANGELOG
7077
id: changelog
7178
uses: requarks/changelog-action@main
7279
with:
7380
token: ${{ github.token }}
81+
tag: ${{ env.previousTag }}
7482

7583
- name: Commit CHANGELOG.md
7684
uses: stefanzweifel/git-auto-commit-action@master

0 commit comments

Comments
 (0)