.github/workflows/changelog.yml 810 B raw
1
name: Update Changelog
2
3
on:
4
  release:
5
    types: [published]
6
7
jobs:
8
  changelog:
9
    runs-on: ubuntu-latest
10
    permissions:
11
      contents: write
12
    steps:
13
      - name: Check out repository
14
        uses: actions/checkout@v4
15
        with:
16
          fetch-depth: 0
17
18
      - name: Generate changelog
19
        uses: orhun/git-cliff-action@v4
20
        with:
21
          config: cliff.toml
22
          args: --verbose
23
        env:
24
          OUTPUT: CHANGELOG.md
25
          GITHUB_REPO: ${{ github.repository }}
26
27
      - name: Commit changelog
28
        run: |
29
          git config user.name "github-actions[bot]"
30
          git config user.email "github-actions[bot]@users.noreply.github.com"
31
          git add CHANGELOG.md
32
          git diff --staged --quiet || git commit -m "chore: update changelog"
33
          git push