Skip to content

Commit 3958c7f

Browse files
cipolleschimeta-codesync[bot]
authored andcommitted
Fix npm package build for docs-only changes (#57719)
Summary: The build_npm_package job uses always() so it can run when one platform-specific prerequisite is skipped. However, that also caused it to run when every artifact-producing prerequisite was skipped, as happens for Markdown-only pull requests. It then failed because there were no artifacts to download. Require at least one Android or Apple artifact-producing prerequisite to have succeeded before running the package build. Failing run: https://github.com/react/react-native/actions/runs/30290299313/job/90058215494?pr=57703 ## Changelog: [INTERNAL] [FIXED] - Skip the npm package build when all artifact-producing prerequisites are skipped Pull Request resolved: #57719 Test Plan: - ./node_modules/.bin/prettier --check .github/workflows/test-all.yml - Parsed .github/workflows/test-all.yml with Ruby YAML - git diff --check Reviewed By: cortinico Differential Revision: D113900588 Pulled By: cipolleschi fbshipit-source-id: f6979ca48b44cf807bf4db12e3c0106d720a9cb1
1 parent 5465647 commit 3958c7f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/test-all.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ jobs:
325325
if: |
326326
always() &&
327327
!contains(needs.*.result, 'failure') &&
328-
!contains(needs.*.result, 'cancelled')
328+
!contains(needs.*.result, 'cancelled') &&
329+
(needs.build_android.result == 'success' ||
330+
needs.prebuild_apple_dependencies.result == 'success' ||
331+
needs.prebuild_react_native_core.result == 'success')
329332
container:
330333
image: reactnativecommunity/react-native-android:latest
331334
env:

0 commit comments

Comments
 (0)