Skip to content

Commit

Permalink
fix(ci): Update changelog.yml with new action
Browse files Browse the repository at this point in the history
Signed-off-by: macinsight <gh@macinsight.net>
  • Loading branch information
macinsight committed Nov 28, 2023
1 parent c747716 commit 50bade3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: changelog

on:
push:
Expand All @@ -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

0 comments on commit 50bade3

Please sign in to comment.