Publish npm package with node-addon-api for Windows (#838)

This commit is contained in:
Fangjun Kuang
2024-05-06 16:21:29 +08:00
committed by GitHub
parent e1bb928805
commit 37a4135dd7
15 changed files with 282 additions and 75 deletions

View File

@@ -61,31 +61,24 @@ jobs:
..
make -j install
- name: Build sherpa-onnx node-addon
shell: bash
run: |
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
pkg-config --cflags sherpa-onnx
pkg-config --libs sherpa-onnx
d=$PWD
export SHERPA_ONNX_INSTALL_DIR=$d/build/install
cd scripts/node-addon-api/
npm i
./node_modules/.bin/node-gyp configure build --verbose
./node_modules/.bin/cmake-js compile --log-level verbose
- name: Prepare for publish
shell: bash
run: |
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
owner=${{ github.repository_owner }}
export owner
ls -lh build/install/lib/
echo "---"