-
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 967 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build with Emscripten and publish to npmjs
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
shell: bash
- name: Build with Emscripten
run: |
source ./emsdk/emsdk_env.sh
npm install
npm run build
cp ./test/llama-3.1-tokenizer.model ./dist/llama-3.1-tokenizer.model
- name: Publish to npmjs registry
run: |
npm config set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
npm publish