Version 2.12.0 #39
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: Release WebAssembly | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
npm: | |
name: NPM Build & Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Cache files between builds | |
- name: Setup | Cache Cargo | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: wasm-build-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup | Rust | |
uses: actions-rs/[email protected] | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
target: x86_64-unknown-linux-gnu | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install binaryen | |
run: | | |
set -e | |
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_114/binaryen-version_114-x86_64-linux.tar.gz | tar xzf - | |
echo "`pwd`/binaryen-version_114/bin" > $GITHUB_PATH | |
- name: Publish NPM for Bundler | |
run: | | |
git config advice.addIgnoredFile false | |
echo $(git describe --abbrev=0 --tags | sed "s/^v//") | |
make wasm:publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |