Skip to content

Commit 8fb70c5

Browse files
committed
Add changelog linting to GitHub CI
1 parent 2e8e7b0 commit 8fb70c5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/haskell.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,3 +645,24 @@ jobs:
645645
echo 'The diff must not contain any `undefined` values'
646646
false
647647
fi
648+
649+
changelog-lint:
650+
runs-on: ubuntu-latest
651+
652+
steps:
653+
- uses: actions/checkout@v4
654+
655+
- name: Install changelog linter
656+
run: |
657+
VERSION=0.1.0.0
658+
BINDIR=$HOME/.local/bin
659+
mkdir -p "$BINDIR"
660+
curl -sSfL "https://github.com/neilmayhew/changelogs/releases/download/$VERSION/changelogs-Linux-x86_64.zip" -o changelogs.zip
661+
unzip changelogs.zip -d "$BINDIR"
662+
rm changelogs.zip
663+
echo "$BINDIR" >> $GITHUB_PATH
664+
665+
- name: Run linter
666+
run: |
667+
git ls-files '*CHANGELOG.md' | xargs -r changelogs --inplace
668+
git diff --exit-code

0 commit comments

Comments
 (0)