Skip to content

feat: enhance as cast #55

feat: enhance as cast

feat: enhance as cast #55

Workflow file for this run

name: Publish Package to npmjs
on:
push:
branches:
- master
- release/*
- wasm/*
paths:
- '**.rs'
- '**/Cargo.*'
- '.github/workflows/npmpkg.yml'
- 'codecov.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
name: Install Rust (stable)
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
- name: install rust
run: cargo install wasm-pack
- name: build wasm
run: wasm-pack build --target bundler --no-default-features --scope pivot-lang --release
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: |
cd pkg
npm version prerelease -preid $(git rev-parse --short "$GITHUB_SHA")
npm publish --access public || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}