Skip to content

Commit 9d07bdc

Browse files
committed
Address comments
1 parent 197b254 commit 9d07bdc

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ jobs:
6969
echo "=== arm64 prebuilds ==="
7070
ls -la prebuilds/linux-arm64/
7171
72+
- name: Install dependencies
73+
# --ignore-scripts skips install/postinstall (native build + message
74+
# generation need a sourced ROS env, which this job doesn't have) while
75+
# still installing devDependencies such as tsup needed for build:dist.
76+
run: npm install --ignore-scripts
77+
78+
- name: Build dist (ESM/CJS bundles)
79+
# npm-pack.sh packs with --ignore-scripts, so the prepack hook that
80+
# normally runs build:dist is skipped. dist/ is git-ignored and absent
81+
# on a fresh checkout, so build it explicitly before packing — the
82+
# published package's main/module/exports all point at ./dist/*.
83+
run: npm run build:dist
84+
7285
- name: Pack
7386
run: ./scripts/npm-pack.sh
7487

@@ -96,7 +109,7 @@ jobs:
96109
fi
97110
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
98111
echo "=== DRY RUN ==="
99-
npm publish --provenance --access public --tag "$TAG" --dry-run ./dist/rclnodejs-*.tgz
112+
npm publish --provenance --access public --tag "$TAG" --dry-run ./pack/rclnodejs-*.tgz
100113
else
101-
npm publish --provenance --access public --tag "$TAG" ./dist/rclnodejs-*.tgz
114+
npm publish --provenance --access public --tag "$TAG" ./pack/rclnodejs-*.tgz
102115
fi

0 commit comments

Comments
 (0)