forked from silvia-odwyer/photon
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.01 KB
/
compile_wasm.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
on: push
name: Wasm testing and building
jobs:
wasm32:
name: Wasm32 check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: wasm32-unknown-unknown
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --all-features --benches --bins --examples --tests
build_wasm:
name: Build Wasm Module
runs-on: ubuntu-latest
needs: wasm32
steps:
- uses: actions/checkout@v2
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack build --target nodejs --out-name photon-node ./crate
- run: rm ./crate/pkg/.gitignore
- name: Deploy
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: compiled-wasm
FOLDER: crate/pkg
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}