Merged
Conversation
- 添加 CI 工作流,支持 Node.js 18/20 多版本测试 - 添加自动发布工作流,支持语义化版本和预发布版本 - 添加文档自动部署工作流 - 更新 README 添加徽章和发布流程说明 - 添加配置指南和 PR 模板
- 更新 publish.yml 使用 NPM_AUTH_TOKEN 而非 NPM_TOKEN - 更新文档说明组织已配置 Organization Secret - 简化配置流程,无需重复配置
- 在生成文档前先构建包,确保类型定义存在 - 添加环境变量防止 CI 中尝试打开浏览器
- 在 CI 环境中创建空的 xdg-open 脚本 - 防止某些包的生命周期脚本尝试打开浏览器 - 添加更多环境变量 (BROWSER, OPEN) 来禁用浏览器打开
- 将 xdg-open 覆盖步骤移到安装依赖之前 - 在 .npmrc 中禁用 fund 和 audit - 确保任何包的 postinstall 脚本都无法打开浏览器
- pnpm docs 是 pnpm 的内置命令,用于打开包文档页面 - pnpm run docs 才是运行 package.json 中定义的 docs 脚本 - 移除不必要的 xdg-open 覆盖和环境变量设置 - 简化工作流配置
- 从 ./docs-theme/custom.css 改为 ../../docs-theme/custom.css - typedoc.json 在 packages/vreo/ 目录,需要相对路径指向根目录的 docs-theme - 本地测试文档生成成功
- 添加 lib/ 目录(构建产物) - 添加 docs/ 目录(生成的文档) - 添加 .vite/ 缓存目录
- 移除 packages/vreo/lib/ (构建产物) - 移除 packages/vreo/docs/ (生成的文档) - 移除 packages/test-app/node_modules/.vite/ (Vite 缓存) - 这些文件应该自动生成,不应该提交到 Git
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
添加完整的 GitHub Actions CI/CD 自动化流程,包括 CI 检查、NPM 自动发布和文档部署。
主要变更
1. CI 工作流 (
.github/workflows/ci.yml)2. NPM 发布工作流 (
.github/workflows/publish.yml)v*.*.*→ npmlatesttagv*.*.*-alpha.*→ npmalphatagv*.*.*-beta.*→ npmbetatagv*.*.*-rc.*→ npmrctagNPM_AUTH_TOKEN3. 文档部署工作流 (
.github/workflows/docs.yml)4. 项目配置更新
.github/SETUP.md)配置要求
已完成
NPM_AUTH_TOKENsecret需要启用
测试情况
v2.6.4-alpha.1发布流程验证版本发布流程
合并后,发布新版本的步骤:
文件变更
.github/workflows/ci.yml- CI 检查工作流.github/workflows/publish.yml- NPM 发布工作流.github/workflows/docs.yml- 文档部署工作流.github/PULL_REQUEST_TEMPLATE.md- PR 模板.github/SETUP.md- 配置指南README.md- 更新说明和徽章.gitignore- 忽略构建产物packages/vreo/typedoc.json- 修正 CSS 路径注意事项