Add workflow to verify CHANGELOG is always up-to-date

This commit is contained in:
Héctor Ramón Jiménez 2023-07-26 02:09:16 +02:00
parent f21958c643
commit 355ef8188a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

17
.github/workflows/verify.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: Verify
on:
pull_request:
branches:
- master
jobs:
changelog:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check `CHANGELOG.md` has changes
run: |
! git diff --exit-code master HEAD CHANGELOG.md
- name: Check `CHANGELOG.md` has PR author
if: ${{ github.event.pull_request.user.name != 'hecrj' }}
run: |
sed -n '/## \[Unreleased\]/,/^## /p' CHANGELOG.md | sed -n '/Many thanks to.../,//p' | grep '@${{ github.event.pull_request.user.name }}'