chore: publish WASM web package #117
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build WASM | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'yggdrasilwasm/**' | |
# Build in main if anything changes in yggdrasil or the ffi layer | |
- 'unleash-yggdrasil/src/**.rs' | |
- 'yggdrasilffi/src/**.rs' | |
tags: | |
- '*' | |
pull_request: | |
paths: | |
- 'yggdrasilwasm/**' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version (for manual trigger)' | |
required: true | |
jobs: | |
build-wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install wasm-pack | |
uses: jetli/[email protected] | |
- name: Build WASM | |
run: | | |
cd yggdrasilwasm | |
wasm-pack build --target web | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Get client spec | |
uses: actions/checkout@v4 | |
with: | |
repository: Unleash/client-specification | |
ref: v5.2.2 | |
path: client-specification | |
- name: Run e2e tests | |
run: | | |
cd yggdrasilwasm/e2e-tests | |
bun i | |
bun test |