@@ -193,7 +193,7 @@ jobs:
193
193
throw new Error("Could not find node versions");
194
194
}
195
195
196
- await $`mkdir -p llamaBins `;
196
+ await $`mkdir -p bins `;
197
197
198
198
async function buildBinary(arch, flags = [], nodeTarget = nodeVersion) {
199
199
console.log(`Building ${arch} for node ${nodeTarget} with flags`, flags);
@@ -218,9 +218,9 @@ jobs:
218
218
await buildBinary("x64", ["--gpu", "false"]);
219
219
}
220
220
221
- // move binaries to llamaBins
221
+ // move binaries to bins
222
222
const localBuildsDirectoryPath = path.join(process.cwd(), "llama", "localBuilds");
223
- const llamaBinsDirectoryPath = path.join(process.cwd(), "llamaBins ");
223
+ const llamaBinsDirectoryPath = path.join(process.cwd(), "bins ");
224
224
for (const folderName of await fs.readdir(localBuildsDirectoryPath)) {
225
225
await fs.move(
226
226
path.join(localBuildsDirectoryPath, folderName, "Release"),
@@ -229,15 +229,15 @@ jobs:
229
229
}
230
230
231
231
await $`echo "Built binaries:"`;
232
- await $`ls llamaBins `;
232
+ await $`ls bins `;
233
233
234
234
EOF
235
235
236
236
- name : Publish artifact
237
237
uses : actions/upload-artifact@v4
238
238
with :
239
239
name : " bins-${{ matrix.config.artifact }}"
240
- path : " llamaBins /*"
240
+ path : " bins /*"
241
241
242
242
standalone-tests :
243
243
name : Standalone tests
@@ -359,8 +359,8 @@ jobs:
359
359
path : artifacts
360
360
- name : Move artifacts
361
361
run : |
362
- mkdir -p llamaBins
363
- mv artifacts/bins-*/* llamaBins /
362
+ mkdir -p bins
363
+ mv artifacts/bins-*/* bins /
364
364
mv artifacts/build dist/
365
365
366
366
cp -r artifacts/llama.cpp/llama.cpp/grammars llama/grammars
@@ -379,7 +379,7 @@ jobs:
379
379
rm -f ./templates/package-lock.json
380
380
381
381
echo "Built binaries:"
382
- ls llamaBins
382
+ ls bins
383
383
- name : Add "postinstall" script to package.json
384
384
run : npm run addPostinstallScript
385
385
- name : Release
@@ -475,8 +475,10 @@ jobs:
475
475
run : npm ci
476
476
477
477
- name : Create Electron app project
478
+ shell : bash
478
479
env :
479
480
DEPLOYED_PACKAGE_VERSION : ${{ needs.release.outputs.package-version }}
481
+ NODE_LLAMA_CPP_SKIP_DOWNLOAD : true
480
482
run : |
481
483
npx --no vite-node ./scripts/scaffoldElectronExampleForCiBuild.ts --packageVersion "$DEPLOYED_PACKAGE_VERSION" --packageFolderPath ./electron-app-example
482
484
cd electron-app-example
@@ -491,10 +493,15 @@ jobs:
491
493
npm run build
492
494
ls ./release
493
495
494
- - name : Add builds to current release
495
- uses : svenstaro /upload-release-action@v2
496
+ - name : Upload artifacts
497
+ uses : actions /upload-artifact@v4
496
498
with :
497
- file : " electron-app-example/release/*.{dmg,zip,exe,appx,AppImage,snap,deb,tar.gz}"
498
- file_glob : true
499
- tag : ${{ needs.release.outputs.package-version }}
500
- make_latest : false
499
+ name : " electron-app-example-${{ matrix.config.name }}"
500
+ path : " ./electron-app-example/release"
501
+
502
+ - name : Add builds to current release
503
+ shell : bash
504
+ env :
505
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
506
+ run : |
507
+ gh release upload "${{ needs.release.outputs.package-version }}" ./electron-app-example/release/*.{dmg,zip,exe,appx,AppImage,snap,deb,tar.gz}
0 commit comments