Skip to content

chore: update version to 0.1.14 #39

chore: update version to 0.1.14

chore: update version to 0.1.14 #39

Workflow file for this run

name: Release npm (ratex-wasm)
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version from tag
id: version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Tag version: $VERSION"
- name: Verify package.json version matches tag
run: |
PKG_VERSION=$(node -p "require('./platforms/web/package.json').version")
if [ "$PKG_VERSION" != "${{ steps.version.outputs.version }}" ]; then
echo "::error::platforms/web/package.json version '$PKG_VERSION' does not match tag ${{ steps.version.outputs.version }}"
exit 1
fi
echo "Version OK: $PKG_VERSION"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install Rust (wasm32 target)
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install dependencies and build
run: |
cd platforms/web
npm ci
npm run build
- name: Publish to npm
run: |
cd platforms/web
npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}