From af3d68217fb3c98fc1ea0c2c00be3d71da1df79a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 8 Dec 2025 07:22:26 +0000 Subject: [PATCH] Add validation for gha-find-replace actions Fail the workflow if no files are modified during file updates. This prevents silent failures in the release process. --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ccae040..60b4f939 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,7 @@ jobs: echo "underline=${underline}" >> "$GITHUB_OUTPUT" - name: Update changelog + id: update_changelog uses: jacobtomlinson/gha-find-replace@v3 with: find: "Next\n----" @@ -63,6 +64,12 @@ jobs: include: CHANGELOG.rst regex: false + - name: Check Update changelog was modified + run: | + if [ "${{ steps.update_changelog.outputs.modifiedFiles }}" = "0" ]; then + echo "Error: No files were modified when updating changelog" + exit 1 + fi - uses: stefanzweifel/git-auto-commit-action@v7 id: commit with: