diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 472f429f7..488fe83cf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,16 +23,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Setup uv - uses: astral-sh/setup-uv@v5 - name: Check for changelog fragment - run: uv run --with "towncrier>=24.8.0" towncrier check --compare-with origin/master + run: | + FRAGMENTS=$(find changelog.d -type f ! -name '.gitkeep' | wc -l) + if [ "$FRAGMENTS" -eq 0 ]; then + echo "::error::No changelog fragment found in changelog.d/" + echo "Add one with: echo 'Description.' > changelog.d/\$(git branch --show-current)..md" + echo "Types: added, changed, fixed, removed, breaking" + exit 1 + fi test_container_builds: name: Docker runs-on: ubuntu-latest diff --git a/changelog.d/changelog-check-align-versioning.changed.md b/changelog.d/changelog-check-align-versioning.changed.md new file mode 100644 index 000000000..fad0ca8bf --- /dev/null +++ b/changelog.d/changelog-check-align-versioning.changed.md @@ -0,0 +1 @@ +Require pull request CI to enforce a real changelog fragment so it matches the push-time versioning workflow.