From 6b9b08e7e0746ab8a555e49997c80dae1654680e Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 8 Jul 2026 14:40:14 +0200 Subject: [PATCH] Fix skipped post-publish jobs in release mode The post_publish, generate_changelog, bump_podfile_lock and create_draft_release jobs are release-only and gate on a bare `if: needs.determine_mode.outputs.mode == 'release'`. Because that expression has no status-check function, GitHub implicitly ANDs a `success()` gate, which evaluates to false when a job in the dependency graph is skipped. In release mode `build_android` (a dependency of `publish_react_native`) is always skipped, so these four downstream jobs were skipped even after a successful publish. `publish_react_native` already works around this with `always()` plus explicit `.result == 'success'` checks; apply the same pattern to the four downstream jobs so they run whenever the release publish succeeds. --- .github/workflows/publish-npm.yml | 35 +++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 2eb06590225b..fad0e0b3a47d 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -201,7 +201,15 @@ jobs: post_publish: runs-on: ubuntu-latest needs: [determine_mode, publish_react_native] - if: needs.determine_mode.outputs.mode == 'release' + # Use always() so this job still runs in release mode even though some + # upstream jobs (e.g. build_android) are skipped and would otherwise + # poison the implicit success() gate. The explicit result checks below + # handle the real gating: only run for a successful release publish. + if: | + always() && + needs.determine_mode.result == 'success' && + needs.publish_react_native.result == 'success' && + needs.determine_mode.outputs.mode == 'release' env: REACT_NATIVE_BOT_GITHUB_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }} steps: @@ -256,19 +264,38 @@ jobs: # ─── Release-only: changelog, podfile bump, draft release ──────── generate_changelog: needs: [determine_mode, publish_react_native] - if: needs.determine_mode.outputs.mode == 'release' + # always() + explicit result checks: run for a successful release publish + # even when skipped upstream jobs would trip the implicit success() gate. + if: | + always() && + needs.determine_mode.result == 'success' && + needs.publish_react_native.result == 'success' && + needs.determine_mode.outputs.mode == 'release' uses: ./.github/workflows/generate-changelog.yml secrets: inherit bump_podfile_lock: needs: [determine_mode, publish_react_native] - if: needs.determine_mode.outputs.mode == 'release' + # always() + explicit result checks: run for a successful release publish + # even when skipped upstream jobs would trip the implicit success() gate. + if: | + always() && + needs.determine_mode.result == 'success' && + needs.publish_react_native.result == 'success' && + needs.determine_mode.outputs.mode == 'release' uses: ./.github/workflows/bump-podfile-lock.yml secrets: inherit create_draft_release: needs: [determine_mode, generate_changelog, set_hermes_version] - if: needs.determine_mode.outputs.mode == 'release' + # always() + explicit result checks: run for a successful release even when + # skipped upstream jobs would trip the implicit success() gate. + if: | + always() && + needs.determine_mode.result == 'success' && + needs.generate_changelog.result == 'success' && + needs.set_hermes_version.result == 'success' && + needs.determine_mode.outputs.mode == 'release' uses: ./.github/workflows/create-draft-release.yml secrets: inherit with: