chore: version bump to 1.2.0 #16
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: main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
permissions: | |
id-token: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: bahmutov/npm-install@v1 | |
- name: prepare rust | |
run: | | |
export RUST_TOOLCHAIN=$(cat rust-toolchain) | |
rustup target add wasm32-wasi --toolchain ${RUST_TOOLCHAIN} | |
rustup target add wasm32-unknown-unknown --toolchain ${RUST_TOOLCHAIN} | |
rustup component add rustfmt --toolchain ${RUST_TOOLCHAIN} | |
rustup component add rust-src --toolchain ${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu | |
unset RUST_TOOLCHAIN | |
cd / | |
cargo install wasm-pack | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/cache/restore@v3 | |
with: | |
path: | | |
deps/wasi-sdk | |
deps/emcc-sdk | |
key: ${{ runner.os }}-${{ github.event.repository.name }}-deps | |
- name: build, lint, and test | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: | | |
npm run build | |
npm run lint | |
npm test | |
- uses: actions/cache/save@v3 | |
with: | |
path: | | |
deps/wasi-sdk | |
deps/emcc-sdk | |
key: ${{ runner.os }}-${{ github.event.repository.name }}-deps |