diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f037a6e..2a1f1d7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -71,6 +71,19 @@ jobs: echo "Tag version ($TAG_VERSION) matches file version ($FILE_VERSION)." fi + - name: Check changelog entry + run: | + if [ github.ref =~ 'refs/tags/[0-9]+\\.[0-9]+\\.[0-9]+$' ]; then + if ! grep -q "## $TAG_VERSION" CHANGELOG.md; then + echo "No changelog entry found for version $TAG_VERSION." + exit 1 + else + echo "Changelog entry found for version $TAG_VERSION." + fi + else + echo "Pre-release tag, skipping changelog check" + fi + publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI