Skip to content

Publish NPM package

Publish NPM package #8

Workflow file for this run

name: Publish NPM package
on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: Version
required: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./expression-js
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
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 dependencies
run: npm i
- name: Build
run: npm run build
- name: Package
run: wasm-pack pack
- name: Publish
run: wasm-pack publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}