Skip to content

Commit ba03ca9

Browse files
authored
fix: include templates in npm package (#219)
1 parent d6a0f43 commit ba03ca9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
with:
3030
name: "build"
3131
path: "dist"
32+
- name: Upload packed templates artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: "build-templates"
36+
path: "templates/packed"
3237
- name: Upload llama.cpp artifact
3338
uses: actions/upload-artifact@v4
3439
with:
@@ -367,6 +372,10 @@ jobs:
367372
rm -f ./llama/gitRelease.bundle
368373
mv artifacts/llama.cpp/gitRelease.bundle ./llama/gitRelease.bundle
369374
375+
mv artifacts/build-templates templates/packed/
376+
rm -f ./templates/package.json
377+
rm -f ./templates/package-lock.json
378+
370379
echo "Built binaries:"
371380
ls llamaBins
372381
- name: Add "postinstall" script to package.json
@@ -403,6 +412,8 @@ jobs:
403412
run: |
404413
cd packages/create-node-llama-cpp
405414
415+
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
416+
406417
if [ "$GH_RELEASE_REF" == "refs/heads/beta" ]; then
407418
npm publish --tag beta
408419
else

0 commit comments

Comments
 (0)