mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-22 21:07:43 +00:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
|
name: Release WASM
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
|
||
|
jobs:
|
||
|
release:
|
||
|
name: Release
|
||
|
runs-on: macos-14
|
||
|
steps:
|
||
|
- name: Checkout Repo
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Setup Node.js 20.x
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 20.x
|
||
|
|
||
|
- name: Setup Deno
|
||
|
uses: denoland/setup-deno@v1
|
||
|
with:
|
||
|
deno-version: v1.x
|
||
|
|
||
|
- uses: pnpm/action-setup@v2
|
||
|
with:
|
||
|
version: 8
|
||
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||
|
with:
|
||
|
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
|
||
|
version: "latest"
|
||
|
- name: Install nextest
|
||
|
uses: taiki-e/install-action@v1
|
||
|
with:
|
||
|
tool: nextest
|
||
|
- run: rustup toolchain install stable --profile minimal
|
||
|
- run: rustup target add wasm32-unknown-unknown
|
||
|
- uses: jetli/wasm-bindgen-action@v0.2.0
|
||
|
with:
|
||
|
version: "0.2.90"
|
||
|
- uses: Swatinem/rust-cache@v2
|
||
|
- name: Build WASM release-build
|
||
|
run: pnpm release-wasm
|
||
|
|
||
|
- name: Create Release Pull Request or Publish to npm
|
||
|
id: changesets
|
||
|
uses: changesets/action@v1
|
||
|
with:
|
||
|
title: 'chore: version packages'
|
||
|
commit: 'chore: version packages'
|
||
|
publish: pnpm changeset publish
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||
|
|