rea-ci-tests-audit
MOmorluto/rea486k8,943 new stars in the last 7 days
Release and publish the dsh-web-ui monorepo (DSH Web GUI plugin family + skin collection) — bump all packages to one unified version, commit and tag, push the vX.Y.Z tag that triggers the GitHub Actions publish pipeline, and verify the npm publish + GitHub Release. Covers post-release verification and bad-version recovery. Use when the user asks to 发布/发版/release/bump 版本/publish a new version of dsh-web-ui or any @linxin666/dsh-* package.
本技能固化 dsh-web-ui 全家桶的完整发版流程:全仓统一版本 → 提交 → 打 tag → 推送触发 GitHub Actions 发布管线(构建/测试/npm 发布/GitHub Release)→ 发布后验证。
@linxin666,registry 固定 registry.npmjs.org。npm whoami 401 属正常);npm 发布全部由
GitHub Actions 管线完成,使用仓库 secret NPM_TOKEN(npm automation token,@linxin666 scope)。pnpm -r publish 自动跳过。cd /Users/zcl/code/dsh-web-ui
git status --short # 明确本次要提交的内容,无意外文件
pnpm test # 全仓测试
pnpm test:scripts # 脚本测试(link-profile 等)
node scripts/aggregate.mjs --check # 聚合清单与磁盘一致(改过 aggregate.yml 时必须先重跑生成)
git log --oneline -5 # 确认包含本次全部改动、无未推送提交
皮肤相关变更(skin.json / 皮肤 bundle)额外跑:
node packages/dsh-skins/build.mjs # 重生成 dsh-skins/skins/ 载体,git status 确认无意外增删
版本 bump 后必须重建产物并同步 gallery 资产(版本信息影响 bundle 内容):
pnpm build # 全仓重建 lib 产物(含新版本号)
node scripts/gallery-build # 重新生成 gallery/(manifest.js/bundles.js 内嵌产物内容)
pnpm gallery:check # 必须通过;产物与 gallery 资产要同一次构建一起提交
find packages -name package.json -not -path '*/node_modules/*' \
-exec sed -i '' 's/"version": "[0-9][^"]*"/"version": "X.Y.Z"/' {} +
find packages -name package.json -not -path '*/node_modules/*' \
-exec grep -H '"version"' {} \; | grep -v '"version": "X.Y.Z"' # 必须无输出
pnpm-lock.yaml 不记录包版本,无需改动;聚合包依赖用 workspace:*,发布时由 pnpm 自动替换为 实际版本,无需手工改依赖链。
提交按两类拆分(保持历史可读):
# 修复/功能改动(含构建产物 lib/*.js 与聚合重生成的 cordis.patch.yml)
git add <修复文件...>
git commit -m "fix(...): <改动摘要>"
# 发版提交:全部 23 个 package.json 版本 bump + 发布相关变更(管线、skill、AGENTS.md)
git add packages/**/package.json .github/workflows/release.yml .dsh/skills/ AGENTS.md
git commit -m "chore(release): bump to X.Y.Z"
git tag "vX.Y.Z" # tag 命名固定 v 前缀;tag 即版本事实源
git push origin main
git push origin "vX.Y.Z" # 推送 tag 即触发发布管线(唯一发布开关)
推送 v* tag 后 GitHub Actions 自动执行,顺序:
node scripts/release-notes.mjs $TAG 把上一 tag 以来的全部常规提交(含合并进来的分支提交,不能只走 --first-parent——v0.1.15 曾因此漏掉整条 perf/refactor 分支)分组为 新功能/修复/其他 并链接 issue,写在 notes 文件(发布前执行,失败即中止,不触碰 npm);pnpm -r publish --no-git-checks --access public(NPM_TOKEN 写入 ~/.npmrc,拓扑序发布,workspace:* 自动转真实版本);gh release create --notes-file 创建 GitHub Release(notes 即第 4 步生成的内容);node scripts/release-assets.mjs $TAG <outDir> 从 registry 逐包 npm pack <name>@<version>(与已发布内容字节一致),再 gh release upload 附到 Release——裸 gh release create 只有 GitHub 自动源码归档,不带 npm 包。关注与排障:
gh run watch # 跟踪最新 run
gh run list --workflow=release.yml # 查历史
NPM_TOKEN secret 缺失/过期 → 到仓库 Settings → Secrets and variables → Actions 更新后再重跑。npm deprecate 标记弃用并立即发下一个补丁版本,不尝试覆盖。npm view @linxin666/dsh-web-ui-all version # 期望 = X.Y.Z
npm view @linxin666/dsh-client-ui-skin-center version
gh release view "vX.Y.Z" # Release 已创建、notes 为分类更新说明(scripts/release-notes.mjs 生成)
gh release view "vX.Y.Z" --json assets # 23 个 @linxin666/dsh-* tgz 资产已附上(scripts/release-assets.mjs 上传)
gh run list --workflow=release.yml # 全部成功
git ls-remote --tags origin | grep "vX.Y.Z" # tag 已在远端
MOmorluto/rea486k8,943 new stars in the last 7 days
MOmorluto/rea486k8,943 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
Block dangerous git commands like push and reset --hard before they execute.
MAmattpocock/skills337k4,978 new stars in the last 7 days