feat: 合并部分pr请求 #35
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: | | |
| npm i -g pnpm | |
| # 清理缓存以解决版本冲突 | |
| rm -rf ~/.npm/_cacache | |
| rm -rf node_modules/.cache | |
| rm -rf packages/core/node_modules | |
| # 清理 pnpm store | |
| pnpm store prune || true | |
| # 重新安装依赖,使用 --ignore-scripts 避免执行可能出问题的脚本 | |
| pnpm install --force --ignore-scripts | |
| - name: Build | |
| run: | | |
| # 验证 esbuild 版本 | |
| echo "esbuild version:" | |
| pnpm exec esbuild --version || echo "esbuild not found in root" | |
| (cd packages/core && pnpm exec esbuild --version) || echo "esbuild not found in core" | |
| # 构建项目 - 只构建 core 包 | |
| # 跳过 update:plugin 步骤,避免 esbuild 版本冲突 | |
| (cd packages/core && pnpm run aeac && pnpm run build:es && pnpm run build:umd) | |
| - name: Create Release Pull Request | |
| id: create_release | |
| uses: changesets/action@v1 | |
| with: | |
| tagName: ${{ env.VERSION }} | |
| releaseName: '${{ env.VERSION }}' | |
| publish: pnpm ci:publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |