fix: 修复 vue-chat-vike 模板 Typography 组件导入导致的 build 报错 #389
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pkg-pr-new | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .node-version | |
| - run: pnpm ci | |
| - run: pnpm build | |
| - name: examples | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const { execSync } = require('child_process'); | |
| const dirs = fs.readdirSync('templates'); | |
| execSync('mkdir examples && cd examples', { stdio: 'inherit' }); | |
| dirs.forEach(name => { | |
| execSync(`node ../dist/index.js ${name} --template ${name}`, { stdio: 'inherit', cwd: 'examples' }); | |
| }); | |
| - run: pnpm dlx pkg-pr-new publish --bin --packageManager=npm,pnpm,bun --template './examples/*' --previewVersion |