From 5c64e5624a90ff43d55b59c161858484b58e6846 Mon Sep 17 00:00:00 2001 From: zackees Date: Fri, 12 Jun 2026 05:44:05 -0700 Subject: [PATCH] fix(ci): run publish jobs when release builds were skipped via artifact reuse publish-pypi and create-release used a plain `if`, whose implied job-level success() evaluates false when any transitive ancestor was skipped. With collect-artifacts reusing CI artifacts, all six build-* jobs skip, so the v2.0.12 run tagged the release but silently skipped publishing. Gate both jobs explicitly on create-tag succeeding with !cancelled(), matching the create-tag condition pattern. Refs #170 Co-Authored-By: Claude Opus 4.7 --- .github/workflows/auto-release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 46f4fb91..002b6c58 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -279,7 +279,14 @@ jobs: publish-pypi: needs: [detect-version, create-tag] - if: needs.detect-version.outputs.should_release == 'true' + # Job-level success() (implied by a plain `if`) evaluates false when any + # transitive ancestor was skipped — and the build-* jobs are skipped + # whenever collect-artifacts reused CI artifacts, which silently skipped + # publishing on the v2.0.12 release. Gate explicitly on create-tag instead. + if: >- + !cancelled() && + needs.detect-version.outputs.should_release == 'true' && + needs.create-tag.result == 'success' runs-on: ubuntu-24.04 environment: name: release @@ -302,7 +309,11 @@ jobs: create-release: needs: [detect-version, create-tag] - if: needs.detect-version.outputs.should_release == 'true' + # Same skipped-ancestor gotcha as publish-pypi above. + if: >- + !cancelled() && + needs.detect-version.outputs.should_release == 'true' && + needs.create-tag.result == 'success' runs-on: ubuntu-24.04 permissions: contents: write