From dcbed4f06fb3d4ea1164f12b84bf520e95c8447e Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Thu, 25 Apr 2024 17:01:42 +1000 Subject: [PATCH] build and store wasm (#2233) --- .github/workflows/build-and-store-wasm.yml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-and-store-wasm.yml diff --git a/.github/workflows/build-and-store-wasm.yml b/.github/workflows/build-and-store-wasm.yml new file mode 100644 index 000000000..ceea7f13e --- /dev/null +++ b/.github/workflows/build-and-store-wasm.yml @@ -0,0 +1,35 @@ +name: Build and Store WASM + +on: + push: + branches: + - main + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - name: Install dependencies + run: yarn + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + - name: Cache wasm + uses: Swatinem/rust-cache@v2 + with: + workspaces: './src/wasm-lib' + - name: build wasm + run: yarn build:wasm + + + # Upload the WASM bundle as an artifact + - uses: actions/upload-artifact@v2 + with: + name: wasm-bundle + path: src/wasm-lib/pkg