name: Generate changelog

on:
  push:
    branches:
      - "release/**"

jobs:
  build:

    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
    - name: Checkout Latest Commit
      uses: actions/checkout@v4

    - name: Generate changelog
      uses: charmixer/auto-changelog-action@v1
      with:
        token: ${{ secrets.github_token }}

    - name: Commit changes
      uses: EndBug/add-and-commit@v7
      with:
        default_author: github_actions
        add: '*.md'