Publish NPM package #8
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: 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}} |