3e0f289d51
- Bumped version numbers across Cargo.toml, Cargo.lock, pyproject.toml, and conda/meta.yaml to 1.1.3. - Added new features including American option pricing, digital options, extended Greeks, and historical volatility estimators. - Enhanced documentation and tests for new functionalities. - Updated CHANGELOG.md to reflect changes for version 1.1.3.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Publish WASM to npm
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
release:
|
|
description: "Publish WASM package to npm"
|
|
type: boolean
|
|
default: true
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
publish:
|
|
name: Build and publish to npm
|
|
runs-on: ubuntu-latest
|
|
if: >-
|
|
(github.event_name == 'release' && github.event.action == 'published')
|
|
|| (github.event_name == 'workflow_dispatch' && inputs.release)
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "20"
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Install Rust and wasm-pack
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: wasm32-unknown-unknown
|
|
- run: cargo install wasm-pack
|
|
|
|
- name: Run WASM tests
|
|
working-directory: wasm
|
|
run: wasm-pack test --node
|
|
|
|
- name: Build WASM package
|
|
run: |
|
|
cd wasm
|
|
npm run build
|
|
|
|
- name: Publish to npm
|
|
working-directory: wasm
|
|
run: npm publish --access public --provenance
|