name: Update changelog on Releases
on:
  pull_request:
    types:
      - opened
      - labeled
      - unlabeled
      - synchronize
    branches:
      - stable

jobs:
  changelog-updated:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      - name: Changelog check
        uses: Zomzog/changelog-checker@v1.3.0
        with:
          fileName: CHANGELOG.md
          noChangelogLabel: bumpless
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
