From 50bade37b08bd1b519f9bb386a4c2521d1ccbbe5 Mon Sep 17 00:00:00 2001 From: macinsight Date: Tue, 28 Nov 2023 10:08:41 +0100 Subject: [PATCH] fix(ci): Update changelog.yml with new action Signed-off-by: macinsight --- .github/workflows/changelog.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index b199a4a1..26039aaa 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,4 +1,4 @@ -name: Deploy +name: changelog on: push: @@ -11,17 +11,21 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get previous tag + id: previousTag + run: | + name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1) + echo "previousTag: $name" + echo "previousTag=$name" >> $GITHUB_ENV - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 with: token: ${{ github.token }} - tag: ${{ github.ref_name }} - - - name: Commit CHANGELOG.md - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: ci - commit_message: 'docs(changelog): update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' - file_pattern: CHANGELOG.md + fromTag: ${{ github.ref_name }} + toTag: ${{ env.previousTag }} + writeToFile: false