Skip to content

v0.1.8

v0.1.8 #11

Workflow file for this run

name: Publish to NPM (Bundler)
on:
release:
types: [published]
permissions:
contents: write
id-token: write
jobs:
build-and-upload:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: jetli/[email protected]
with:
version: "latest"
- name: Build WASM for npm (bundle)
run: wasm-pack build --out-name mdmodels-core --release --features wasm --no-default-features
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Update package name
run: |
jq '.name = "mdmodels-core"' pkg/package.json > pkg/package.json.tmp
mv pkg/package.json.tmp pkg/package.json
- run: |
cd pkg/
npm install --package-lock-only
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}