Files
mainsail/.github/workflows/update_changelog.yml
T

43 lines
1.0 KiB
YAML

name: Update changelog
on:
# Update the changelog after pushing a new tag
push:
tags:
- '*'
# Update the changelog by invoking this workflow manually
workflow_dispatch:
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get latest tag
run: |
echo "::set-output name=TAG_NAME::$(git describe --tags $(git rev-list --tags --max-count=1))"
id: latest_tag
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
id: git-cliff
with:
config: cliff.toml
args: v0.0.4..${{ steps.latest_tag.outputs.TAG_NAME }}
env:
OUTPUT: CHANGELOG.md
- name: show CHANGELOG
run: |
cat CHANGELOG.md
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(changelog): update changelog'
file_pattern: CHANGELOG.md
branch: develop