Skip to content

Commit

Permalink
chore: introduce pkg.pr.new
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jul 3, 2024
1 parent 0118a50 commit 224ce5a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Any Commit
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: corepack enable
- uses: actions/setup-node@v4
- name: Install
run: |
cargo install -f wasm-bindgen-cli wasm-opt
rustup target add wasm32-unknown-unknown
npm i
- name: Build wasm
run: npm run build:cargo &&npm run build
- name: Test Node.js
run: |
cd ${GITHUB_WORKSPACE}/demo/node
npm install
npm test
- name: Build web
run: |
cd ${GITHUB_WORKSPACE}/demo/web
npm install
PUBLIC_URL='/jieba-wasm/' npm run build
- name: Publish to pkg.pr.new
run: |
cd ${GITHUB_WORKSPACE}
npx pkg-pr-new publish

0 comments on commit 224ce5a

Please sign in to comment.