Skip to content

Commit fd3a3f5

Browse files
fix: copy native binaries to npm package directories
1 parent 0630b07 commit fd3a3f5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,25 @@ jobs:
114114
run: |
115115
cd native
116116
pnpm napi create-npm-dirs
117+
# List created dirs
118+
ls -la npm/
119+
120+
- name: Copy binaries to npm packages
121+
run: |
122+
cd native
123+
# Copy each .node file to its corresponding npm package directory
124+
for node_file in *.node; do
125+
# Extract platform from filename (e.g., graphql-lint.darwin-arm64.node -> darwin-arm64)
126+
platform=$(echo "$node_file" | sed 's/graphql-lint\.//' | sed 's/\.node//')
127+
target_dir="npm/$platform"
128+
if [ -d "$target_dir" ]; then
129+
cp "$node_file" "$target_dir/"
130+
echo "Copied $node_file to $target_dir/"
131+
ls -la "$target_dir/"
132+
else
133+
echo "Warning: $target_dir not found for $node_file"
134+
fi
135+
done
117136
118137
- name: Add repository to platform packages
119138
run: |

0 commit comments

Comments
 (0)