Bump version #442
Workflow file for this run
This file contains hidden or 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: WASM | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./wasm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
cache-dependency-path: wasm/pnpm-lock.yaml | |
architecture: x64 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install wasm-pack | |
run: cargo install wasm-pack --locked | |
- name: Tests | |
run: pnpm test | |
- name: WASM build and pack | |
run: | | |
rm -rf pkg | |
wasm-pack build | |
wasm-pack pack | |
- name: Upload NPM pkg artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: npm-pkg | |
path: ./wasm/pkg/*-*.tgz | |
- name: Publish | |
if: startsWith(github.event.ref, 'refs/tags') | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: wasm/pkg/package.json |