diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f86044..4e8e9ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,7 @@ env: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v1.0.1 @@ -21,3 +19,10 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + + build_wasm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: Swatinem/rust-cache@v1.0.1 + - run: cargo build --target wasm32-unknown-unknown --no-default-features \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed98624..c4360de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,36 @@ jobs: run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose - name: Publish CLI run: sleep 20 && cargo publish --manifest-path kalk_cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose + + publish_npm: + name: publish to npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: Swatinem/rust-cache@v1.0.1 + - uses: actions/setup-node@v1 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - name: Build + run: | + yarn install + cd kalk + wasm-pack build --scope paddim8 -- --no-default-features + - name: Publish + run: | + sudo apt install expect + /usr/bin/expect <