From bde48e8591fa012f830eb7e378818c01be75ca47 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 18 Aug 2026 18:32:47 +0200 Subject: [PATCH] fix: ensure the committed changelog ends with a trailing newline --- .github/workflows/python_bump_and_update_changelog.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/python_bump_and_update_changelog.yaml b/.github/workflows/python_bump_and_update_changelog.yaml index e3cfe30..27e64ab 100644 --- a/.github/workflows/python_bump_and_update_changelog.yaml +++ b/.github/workflows/python_bump_and_update_changelog.yaml @@ -114,6 +114,15 @@ jobs: write-mode: overwrite contents: ${{ inputs.changelog }} + # The 'changelog' input travels through a $GITHUB_OUTPUT heredoc, which strips the trailing + # newline, so the input path above writes the file without one. Normalize here so the committed + # changelog always ends with a newline, whichever path wrote it. + - name: Ensure the changelog ends with a newline + shell: bash + env: + CHANGELOG_PATH: ${{ inputs.changelog_path }} + run: sed -i -e '$a\' "${CHANGELOG_PATH}" + - name: Commit changes id: commit uses: apify/actions/signed-commit@v1.0.0