Skip to content

Commit 698c946

Browse files
fix: validate exact number of .node files during publish
1 parent 736e68b commit 698c946

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/CI.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,32 @@ jobs:
167167
pattern: bindings-*
168168
merge-multiple: true
169169

170+
- name: Move artifacts
171+
run: |
172+
# Move .node files to root
173+
find . -type f -name "*.node" -exec mv {} . \;
174+
175+
# Count .node files
176+
node_count=$(ls -1 *.node 2>/dev/null | wc -l)
177+
expected_count=5 # We target 5 platforms
178+
179+
echo "Found $node_count .node files (expected $expected_count)"
180+
ls -la *.node
181+
182+
if [ "$node_count" -ne "$expected_count" ]; then
183+
echo "Error: Expected $expected_count .node files but found $node_count"
184+
exit 1
185+
fi
186+
170187
- name: Build TypeScript
171188
run: npm run build:ts
172189

173190
- name: Verify package contents
174191
run: |
175192
echo "Package contents:"
176193
npm pack --dry-run
194+
echo "\nVerifying .node files:"
195+
tar -tvf *.tgz | grep "\.node"
177196
178197
- name: Publish
179198
if: startsWith(github.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)