name: build on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: setup Rust toolchain run: | curl https://sh.rustup.rs -sSf | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH" rustup target add wasm32-wasi - name: build run: | export PATH="$HOME/.cargo/bin:$PATH" cargo build - name: build examples on WASI run: | export PATH="$HOME/.cargo/bin:$PATH" cargo build --examples - name: test publish run: | cargo publish --dry-run