Skip to content

utoopack-v1.5.12

utoopack-v1.5.12 #538

Workflow file for this run

name: utooweb-release
on:
release:
types: [published]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
publish:
if: startsWith(github.event.release.tag_name, 'utooweb-v')
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- name: Init git submodules
run: git submodule update --init --recursive --depth 1
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: 22.14.0
package-manager-cache: false
registry-url: "https://registry.npmjs.org"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-07-29
targets: wasm32-unknown-unknown
components: rust-src
# - name: Cache cargo
# uses: Swatinem/rust-cache@v2
# with:
# shared-key: utooweb-release
- name: Setup Utoo
uses: utooland/setup-utoo@v1
- name: Install dependencies
run: |
utoo install
npm install binaryen@123.0.0 --global
- name: Install wasm-bindgen-cli
uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: '0.2.108'
- name: Build
run: npx turbo run build --filter=@utoo/web
- name: Get version from release or use alpha version
id: get_version
shell: bash
run: |
TAG_NAME="${{ github.event.release.tag_name }}"
VERSION=${TAG_NAME#utooweb-v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Update npm for trusted publishing
run: npm install -g npm@11.6.2
- name: NPM Publish
run: |
set -euo pipefail
echo "${VERSION}"
TAG="latest"
if [[ "$VERSION" == *"-"* ]]; then
PRERELEASE="${VERSION#*-}"
TAG="${PRERELEASE%%.*}"
fi
echo "Publishing with tag: $TAG"
npm version --workspace=@utoo/web "${VERSION}" --no-git-tag-version --workspaces-update=false &&
npm publish --workspace=@utoo/web --access public --tag "${TAG}"
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}