From dfa1785f27eeb5185f6c06605a8cc1a1d9136aca Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Mon, 17 Aug 2026 09:50:29 +0200 Subject: [PATCH 1/2] fix: read the changelog from an artifact in the Python release workflow --- .../python_bump_and_update_changelog.yaml | 63 +++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_bump_and_update_changelog.yaml b/.github/workflows/python_bump_and_update_changelog.yaml index ccf9b90..b504279 100644 --- a/.github/workflows/python_bump_and_update_changelog.yaml +++ b/.github/workflows/python_bump_and_update_changelog.yaml @@ -12,9 +12,23 @@ on: required: true type: string changelog: - description: The complete changelog - required: true + description: | + Deprecated: the complete changelog as a string. Used only when the changelog artifact is missing, + and unusable once the changelog grows over 128 KiB. Callers on + apify/actions/git-cliff-release v1.5.0 or newer should stop passing it. + required: false + type: string + default: "" + changelog_artifact_name: + description: Name of the artifact holding the changelog, as uploaded by apify/actions/git-cliff-release + required: false type: string + default: git-cliff-changelog + changelog_path: + description: Path to the changelog file within the repository + required: false + type: string + default: CHANGELOG.md secrets: APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN: required: true @@ -52,10 +66,51 @@ jobs: echo "Updating version in pyproject.toml to ${new_version}" uv version "${new_version}" - - name: Update CHANGELOG.md + # The changelog is handed over as an artifact instead of a string input, because an action input is + # passed to the action as an environment variable and Linux caps a single environment variable at + # 128 KiB - past that the step fails to start with "Argument list too long". + - name: Download changelog artifact + id: changelog_artifact + uses: actions/download-artifact@v8 + continue-on-error: true + with: + name: ${{ inputs.changelog_artifact_name }} + path: ${{ runner.temp }}/changelog + + - name: Update the changelog + if: ${{ steps.changelog_artifact.outcome == 'success' }} + shell: bash + env: + ARTIFACT_NAME: ${{ inputs.changelog_artifact_name }} + CHANGELOG_PATH: ${{ inputs.changelog_path }} + DOWNLOADED_CHANGELOG: ${{ runner.temp }}/changelog/CHANGELOG.md + run: | + set -euo pipefail + + if [[ ! -s "${DOWNLOADED_CHANGELOG}" ]]; then + echo "::error::Artifact '${ARTIFACT_NAME}' holds no non-empty CHANGELOG.md" + exit 1 + fi + + echo "Writing $(wc -c < "${DOWNLOADED_CHANGELOG}") bytes to ${CHANGELOG_PATH}" + mv "${DOWNLOADED_CHANGELOG}" "${CHANGELOG_PATH}" + + - name: Fail on a missing changelog + if: ${{ steps.changelog_artifact.outcome != 'success' && inputs.changelog == '' }} + shell: bash + env: + ARTIFACT_NAME: ${{ inputs.changelog_artifact_name }} + run: | + echo "::error::Neither the '${ARTIFACT_NAME}' artifact nor the 'changelog' input carries a changelog" + exit 1 + + # Deprecated path for callers still on apify/actions/git-cliff-release older than v1.5.0, which does + # not upload the artifact. Drop it, together with the 'changelog' input, once every caller is bumped. + - name: Update the changelog from the input + if: ${{ steps.changelog_artifact.outcome != 'success' }} uses: DamianReeves/write-file-action@v1.3 with: - path: CHANGELOG.md + path: ${{ inputs.changelog_path }} write-mode: overwrite contents: ${{ inputs.changelog }} From 27c0c9771cd3afe5a2bfb164b4d57e9dfcbf5aa8 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Mon, 17 Aug 2026 11:56:48 +0200 Subject: [PATCH 2/2] docs: correct the git-cliff-release version in the changelog deprecation notes --- .github/workflows/python_bump_and_update_changelog.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_bump_and_update_changelog.yaml b/.github/workflows/python_bump_and_update_changelog.yaml index b504279..e3cfe30 100644 --- a/.github/workflows/python_bump_and_update_changelog.yaml +++ b/.github/workflows/python_bump_and_update_changelog.yaml @@ -15,7 +15,7 @@ on: description: | Deprecated: the complete changelog as a string. Used only when the changelog artifact is missing, and unusable once the changelog grows over 128 KiB. Callers on - apify/actions/git-cliff-release v1.5.0 or newer should stop passing it. + apify/actions/git-cliff-release v1.4.1 or newer should stop passing it. required: false type: string default: "" @@ -104,7 +104,7 @@ jobs: echo "::error::Neither the '${ARTIFACT_NAME}' artifact nor the 'changelog' input carries a changelog" exit 1 - # Deprecated path for callers still on apify/actions/git-cliff-release older than v1.5.0, which does + # Deprecated path for callers still on apify/actions/git-cliff-release older than v1.4.1, which does # not upload the artifact. Drop it, together with the 'changelog' input, once every caller is bumped. - name: Update the changelog from the input if: ${{ steps.changelog_artifact.outcome != 'success' }}