File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed
Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,35 @@ jobs:
9090
9191 - name : Download all artifacts
9292 uses : actions/download-artifact@v4
93+ with :
94+ path : artifacts
9395
9496 - name : List downloaded artifacts
95- run : ls -la
96-
97- - name : Prepare npm packages
98- run : npx napi prepublish -t npm
97+ run : ls -R artifacts/
9998
10099 - name : Move artifacts to npm packages
101- run : npx napi artifacts
100+ run : |
101+ # Create npm directories for each platform we're building
102+ mkdir -p npm/linux-x64-gnu npm/linux-arm64-gnu npm/win32-x64-msvc
103+
104+ # Copy artifacts to correct locations
105+ cp artifacts/bindings-x86_64-unknown-linux-gnu/*.node npm/linux-x64-gnu/
106+ cp artifacts/bindings-aarch64-unknown-linux-gnu/*.node npm/linux-arm64-gnu/
107+ cp artifacts/bindings-x86_64-pc-windows-msvc/*.node npm/win32-x64-msvc/
108+
109+ # Create package.json for each platform package
110+ for dir in npm/*/; do
111+ platform=$(basename "$dir")
112+ cat > "$dir/package.json" << EOF
113+ {
114+ "name": "@databricks/zerobus-sdk-$platform",
115+ "version": "0.1.0",
116+ "os": ["${platform%%-*}"],
117+ "cpu": ["${platform#*-}"],
118+ "main": "zerobus-sdk-ts.$platform.node"
119+ }
120+ EOF
121+ done
102122
103123 - name : List packages
104124 run : ls -R ./npm
You can’t perform that action at this time.
0 commit comments