name: Changelog

on:
  push:
    branches:
      - main

jobs:
  changelog:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2

      - name: "✏️ Generate release changelog"
        uses: heinrichreimer/github-changelog-generator-action@v2.3
        with:
          token: ${{ secrets.GITHUB_TOKEN }} 

      - name: Commit changes
        uses: EndBug/add-and-commit@v9
        with:
          author_name: bot-changelog
          author_email: changelog@bot.com
          message: 'chore: update changelog'
          add: '*'
