Skip to content

ci: update node to version 22 #1107

ci: update node to version 22

ci: update node to version 22 #1107

name: ci-wrapper-wasm
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build_test:
name: Build & Test WASM Wrapper
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./wrappers/wasm
steps:
- name: Checkout
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # [email protected]
- name: Setup rust toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # [email protected]
with:
profile: minimal
toolchain: stable
override: true
- name: Export Clang
run: export CC=/usr/bin/clang
- name: Run yarn install
run: yarn install --frozen-lockfile
- name: Run yarn setup
run: yarn setup
- name: Run yarn build
run: yarn build
- name: Run yarn test
run: yarn test
- name: Run yarn benchmark
run: yarn benchmark
publish_unstable:
name: Publish unstable package release
needs: build_test
runs-on: ubuntu-latest
if: "github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'chore(release): publish')"
defaults:
run:
working-directory: ./wrappers/wasm
steps:
- name: Checkout
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # [email protected]
- name: Setup rust toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # [email protected]
with:
profile: minimal
toolchain: stable
override: true
# Required for publishing NPM package
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- name: Run yarn install
run: yarn install --frozen-lockfile
- name: Run yarn setup
run: yarn setup
- name: Run yarn build
run: yarn build
- name: Configure NPM JS User
run: |
git config user.name "Mattr CI"
git config user.email "[email protected]"
npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Publish unstable build
run: yarn publish:unstable
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
publish_release:
name: Publish package release
needs: build_test
runs-on: ubuntu-latest
if: "github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, 'chore(release): publish')"
defaults:
run:
working-directory: ./wrappers/wasm
steps:
- name: Checkout
uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # [email protected]
- name: Setup rust toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # [email protected]
with:
profile: minimal
toolchain: stable
override: true
# Required for publishing NPM package
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- name: Run yarn install
run: yarn install --frozen-lockfile
- name: Run yarn setup
run: yarn setup
- name: Run yarn build
run: yarn build
- name: Configure NPM JS User
run: |
git config user.name "Mattr CI"
git config user.email "[email protected]"
npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Publish release build
run: yarn publish:release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}