Problem description
In .github/workflows/npm-publish.yml, the guard that checks whether node_modules leaked into the published tarball uses:
- name: Check if any node_modules were packed
id: check_node_modules
run: ! grep --silent -E "node_modules/.+" build.log
…but the diagnostic step is gated on a step id that does not exist:
- name: Show packed node_modules
if: failure() && steps.node_modules.outcome == 'failure' # <-- should be steps.check_node_modules
run: ! grep -E "node_modules/.+" build.log
There is no step with id: node_modules, so steps.node_modules.outcome is always undefined and the condition can never be true. The diagnostic never runs. If a regression ever bundles node_modules into the npm package, the publish job fails (correctly, via check_node_modules) but the log that's supposed to show which paths leaked is silently skipped.
(The diagnostic's own run is otherwise fine: ! grep -E ... prints the matching lines, then inverts the exit code — so it would surface the offending paths if it were reached.)
Proposed solution
Fix the step id reference:
- name: Show packed node_modules
if: failure() && steps.check_node_modules.outcome == 'failure'
run: grep -E "node_modules/.+" build.log
Alternative solutions
Drop the diagnostic step entirely and rely on Show build log, which already prints the full build.log on build failure — though it's gated on steps.build.outcome, not the node_modules check, so it wouldn't fire for this specific failure mode either. Fixing the id is the smaller, correct change.
Benefits to React Native ExecuTorch
Restores a working safety diagnostic in the daily publish pipeline, so an accidental node_modules inclusion is debuggable straight from CI logs instead of requiring a local repro.
Additional context
File: .github/workflows/npm-publish.yml (the three consecutive Check… / Show build log / Show packed node_modules steps in the build job).
Problem description
In
.github/workflows/npm-publish.yml, the guard that checks whethernode_modulesleaked into the published tarball uses:…but the diagnostic step is gated on a step id that does not exist:
There is no step with
id: node_modules, sosteps.node_modules.outcomeis always undefined and the condition can never be true. The diagnostic never runs. If a regression ever bundlesnode_modulesinto the npm package, the publish job fails (correctly, viacheck_node_modules) but the log that's supposed to show which paths leaked is silently skipped.(The diagnostic's own
runis otherwise fine:! grep -E ...prints the matching lines, then inverts the exit code — so it would surface the offending paths if it were reached.)Proposed solution
Fix the step id reference:
Alternative solutions
Drop the diagnostic step entirely and rely on
Show build log, which already prints the fullbuild.logon build failure — though it's gated onsteps.build.outcome, not the node_modules check, so it wouldn't fire for this specific failure mode either. Fixing the id is the smaller, correct change.Benefits to React Native ExecuTorch
Restores a working safety diagnostic in the daily publish pipeline, so an accidental
node_modulesinclusion is debuggable straight from CI logs instead of requiring a local repro.Additional context
File:
.github/workflows/npm-publish.yml(the three consecutiveCheck…/Show build log/Show packed node_modulessteps in thebuildjob).