feat(chat): add new chat components #7213
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: MAIN_PULL_REQUEST | |
| on: | |
| pull_request: | |
| branches: [develop, main, compositionAPI] | |
| # opened:当 PR 创建时触发 | |
| # synchronize:当 PR 的源分支有新的提交时触发 | |
| # reopened:当关闭的 PR 重新打开时触发 | |
| types: [opened, synchronize, reopened] | |
| # workflow_dispatch:允许手动触发工作流 | |
| workflow_dispatch: | |
| # todo: paopao | |
| # jobs: | |
| # call-test-build: | |
| # uses: Tencent/tdesign/.github/workflows/test-build.yml@main | |
| jobs: | |
| check: | |
| # 在最新版本的 Ubuntu 环境中运行 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 检出代码仓库 | |
| - uses: actions/checkout@v4 | |
| # 检查 GitHub 提交记录中的邮箱 | |
| - name: check_github_primary_email | |
| run: | | |
| # 获取最新提交的作者邮箱和提交者邮箱 | |
| log_emails=$(git log --pretty=format:"%ae %ce" -1) | |
| # 如果邮箱包含 '[email protected]',跳过验证 | |
| if [[ ${log_emails} =~ '[email protected]' ]];then | |
| echo "$log_emails 跳过验证" | |
| exit 0 | |
| fi | |
| # 如果邮箱包含 '@tencent.com',校验失败,提示用户更改邮箱 | |
| if [[ ${log_emails} =~ '@tencent.com' ]];then | |
| echo "默认邮箱 $log_emails 校验非法,可以去 https://github.com/settings/emails 更改" | |
| exit 2; | |
| else | |
| # 否则,校验通过 | |
| echo "邮箱 $log_emails 校验通过"; | |
| fi | |
| # 再次检出代码仓库,这次使用 PR 的源分支的 SHA | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| # 检查本地提交记录中的邮箱 | |
| - name: check_local_email | |
| run: | | |
| # 获取最新提交的作者邮箱和提交者邮箱 | |
| log_emails=$(git log --pretty=format:"%ae %ce" -1) | |
| # 如果邮箱包含 '[email protected]',跳过验证 | |
| if [[ ${log_emails} =~ '[email protected]' ]];then | |
| echo "$log_emails 跳过验证" | |
| exit 0 | |
| fi | |
| # 如果邮箱包含 '@tencent.com',校验失败,提示用户更改本地邮箱 | |
| if [[ ${log_emails} =~ '@tencent.com' ]];then | |
| echo "本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交" | |
| exit 2; | |
| else | |
| # 否则,校验通过 | |
| echo "邮箱 $log_emails 校验通过"; | |
| fi | |
| lint: | |
| # 如果需要依赖 check 任务,可以取消注释 | |
| # needs: check | |
| # 在最新版本的 Ubuntu 环境中运行 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 检出代码仓库,并递归初始化子模块 | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # 设置 pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| # 设置 Node.js 环境,版本为 18 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'pnpm' | |
| # 安装依赖 | |
| - run: pnpm install --frozen-lockfile | |
| # 运行代码 lint 检查 | |
| - run: pnpm run lint | |
| test: | |
| # 如果需要依赖 check 任务,可以取消注释 | |
| # needs: check | |
| # 在最新版本的 Ubuntu 环境中运行 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 检出代码仓库,并递归初始化子模块 | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # 设置 pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| # 设置 Node.js 环境,版本为 18 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'pnpm' | |
| # 安装依赖 | |
| - run: pnpm install --frozen-lockfile | |
| # 运行测试 | |
| - run: pnpm run test:vue | |
| build_vue-next: | |
| # 在最新版本的 Ubuntu 环境中运行 | |
| runs-on: ubuntu-latest | |
| # 如果需要依赖自身任务,可以取消注释(通常不需要) | |
| # needs: build | |
| steps: | |
| # 检出代码仓库,并递归初始化子模块 | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # 设置 pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| # 设置 Node.js 环境,版本为 18 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'pnpm' | |
| # 安装依赖 | |
| - run: pnpm install --frozen-lockfile | |
| # 运行构建任务 | |
| - name: Build | |
| run: pnpm run build:vue | |
| - run: pnpm -F tdesign-vue-next publish --no-git-checks --dry-run | |
| build-chat: | |
| # 在最新版本的 Ubuntu 环境中运行 | |
| runs-on: ubuntu-latest | |
| # 如果需要依赖自身任务,可以取消注释(通常不需要) | |
| # needs: build | |
| steps: | |
| # 检出代码仓库,并递归初始化子模块 | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # 设置 pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| # 设置 Node.js 环境,版本为 18 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'pnpm' | |
| # 安装依赖 | |
| - run: pnpm install --frozen-lockfile | |
| # 运行构建任务 | |
| - name: Build | |
| run: pnpm run build:chat | |
| - run: pnpm -F @tdesign-vue-next/chat publish --no-git-checks --dry-run |