-
-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (28 loc) · 901 Bytes
/
wasm_publish.yml
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
name: Build as WASM and publish in npm
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
name: Build and publish to npm
steps:
- name: git-checkout
uses: actions/checkout@v4
- name: install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: build wasm
run: wasm-pack build gulagcleaner_wasm --target web --release -d WASM_build
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: run install
working-directory: ./gulagcleaner_wasm/WASM_build
run: npm install
- name: publish to npm
working-directory: ./gulagcleaner_wasm/WASM_build
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}