Skip to content

Add Changelog workflow #1

Add Changelog workflow

Add Changelog workflow #1

Workflow file for this run

name: Generate Changelog
on:
push:
branches:
- main # Adjust to your default branch
tags:
- 'v*'
jobs:
changelog:
runs-on: ubuntu-latest
permissions:
contents: write # Required to push the updated CHANGELOG.md
steps:

Check failure on line 15 in .github/workflows/changelog.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/changelog.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
- name: Checkout repository
uses: [actions/checkout](https://github.com)
with:
fetch-depth: 0 # Required to fetch all tags and history
- name: Generate Changelog
uses: [orhun/git-cliff-action](https://github.com/marketplace/actions/git-cliff-changelog-generator)
id: git-cliff
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit and push changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add CHANGELOG.md
# Only commit if there are changes to avoid workflow errors
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update CHANGELOG.md [skip ci]" && git push)