name: Generate changelog
on:
  release:
    types: [created, edited, published]
  workflow_dispatch:

jobs:
  generate-changelog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: BobAnkh/auto-generate-changelog@master
        with:
          REPO_NAME: "kjappelbaum/moffragmentor"
          ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
          PATH: "CHANGELOG.md"
          COMMIT_MESSAGE: "docs(CHANGELOG): update release notes"
          TYPE: "feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements"
