Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Update readme

Update readme #212

Workflow file for this run

name: build wasm package
on:
pull_request:
branches:
- main
release:
types: [published]
jobs:
detect-changes:
uses: ./.github/workflows/check_diff.yml
with:
pattern: ^crates/hyperdrive-wasm/
build:
needs: detect-changes
# Run if changes are detected OR if triggered by a release
if: (needs.detect-changes.outputs.changed == 'true') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/hyperdrive-wasm@v'))
name: build
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
token: ${{github.token}}
- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: setup foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: check out hyperdrive
uses: actions/checkout@master
with:
repository: delvtech/hyperdrive
ref: "v0.8.0"
path: "./hyperdrive"
ssh-key: ${{ secrets.HYPERDRIVE_ACCESS_KEY }}
- name: build hyperdrive-wasm
working-directory: crates/hyperdrive-wasm
run: sh scripts/build.sh
- name: publish hyperdrive-wasm
if: github.event_name == 'release'
working-directory: crates/hyperdrive-wasm/pkg
run: npm publish --access public