ci: add npm publish automation + OpenClaw smoke#24
Merged
Conversation
Two CI changes:
1. release.yml — subscribe to 'release: published' events:
- Re-runs npm test + npm run verify:skills before publish
- Gates publish on tag == package.json version (prevents drift between
'git tag v2.1.x' and an out-of-sync package.json)
- Uses npm provenance (requires id-token: write OIDC permission)
- Reads NPM_TOKEN from repository secret
Future flow: 'gh release create v2.1.x' triggers automatic npm publish.
2. ci.yml — add smoke-openclaw matrix job:
- Mirrors smoke-claude / smoke-codex / smoke-gemini structure
- Covers ubuntu / macos / windows installer paths
- Asserts: ~/.openclaw/skills, workspace/{AGENTS,SOUL}.md, .sage-uninstall.js
- Smoke matrix was missing openclaw target since v2.1.8
Verified locally against pristine $HOME: install creates expected paths,
uninstall removes them.
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.
Summary
两项 CI 自动化:
1.
release.yml— npm 自动发布订阅
release: published事件。以后小宝在 GitHub 上gh release create v2.1.x之后,workflow 自动跑测试 + skills 契约 +npm publish --provenance,不再需要本地手动 publish。安全 gate:
tag == package.json.version:tagv2.1.x必须对应 package.json2.1.x,否则 abort(防止 git tag 和 package 漂移)npm test+npm run verify:skills才 publish--provenance:在 npmjs.com 公开记录 publish 来源(GitHub Actions run),有官方 attestationid-token: writeOIDC 权限(provenance 必需)NPM_TOKEN走 repository secret,不落地2.
ci.yml— 补 OpenClaw smoke仓库自 v2.1.8 起支持
openclawtarget,但 CI smoke 矩阵一直只覆盖 claude/codex/gemini。这次补齐smoke-openclawjob,结构与 gemini 对齐:~/.openclaw/skills/、workspace/AGENTS.md、workspace/SOUL.md、.sage-uninstall.jscommands/不存在、skills/gstack不存在.sage-backup清空Validation
本地预跑 OpenClaw 安装确认 smoke 断言全部对得上:
Migration
gh release create→ workflow 自动 publishDiff