Skip to content

fix(ci): npm publish uses HTTPS and sets version from tag#19

Merged
Shadow-Azure merged 1 commit into
mainfrom
fix/npm-publish-https
Jun 4, 2026
Merged

fix(ci): npm publish uses HTTPS and sets version from tag#19
Shadow-Azure merged 1 commit into
mainfrom
fix/npm-publish-https

Conversation

@Shadow-Azure

Copy link
Copy Markdown
Owner

问题

npm publish 失败,报错:

npm error command git --no-replace-objects ls-remote ssh://git@github.com/packages/cli-box-darwin-arm64.git
npm error git@github.com: Permission denied (publickey).

原因:

  1. CI 环境没有 SSH key,npm 尝试用 SSH 访问 GitHub
  2. package.json 中版本是 0.2.0,但发布 tag 是 v0.0.1,版本不匹配

解决方案

  1. 配置 git 使用 HTTPS 替代 SSH
  2. 发布前从 git tag 自动设置版本号

测试

合入后删除旧 release,重新创建 v0.0.1 release 触发 workflow。

- Configure git to use HTTPS instead of SSH (avoids permission denied in CI)
- Set package version from git tag before publishing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🔒 门禁检查结果

检查项 状态
Rust 格式化 ✅ success
Rust Clippy ✅ success
Rust 测试 & 覆盖率 ✅ success
前端测试 & 覆盖率 ✅ success
Playwright E2E ✅ success
统一测试 (test.sh) ✅ success
安全检查 ✅ success

Rust 测试覆盖率

指标 覆盖率
行覆盖率 69.2%
分支覆盖率 0.0%
模块 行覆盖率
crates.cli-box-core.src.automation ███████████░░░░░░░░░ 58.8%
crates.cli-box-core.src ███████████░░░░░░░░░ 55.3%
crates.cli-box-core.src.instance ███████████████████░ 99.1%
crates.cli-box-core.src.sandbox ███████████████████░ 98.8%
crates.cli-box-core.src.daemon ██████████░░░░░░░░░░ 53.2%
crates.cli-box-core.src.process █████████████░░░░░░░ 65.7%
crates.cli-box-core.src.server █████████████████░░░ 87.5%
crates.cli-box-core.src.capture ████████████████████ 100.0%

详细报告见 Rust 覆盖率 artifact

前端测试覆盖率

指标 覆盖率
行覆盖率 ████████████████░░░░ 82.3%
分支覆盖率 68.9%
函数覆盖率 80.0%
语句覆盖率 80.0%
文件 行覆盖率
src/tests/mocks/websocket.ts ██████████████████░░ 88.0%
src/tests/mocks/xterm.ts ████████████████████ 100.0%
src/renderer/api.ts ██████████████░░░░░░ 68.2%
src/renderer/tabState.ts ████████████████████ 100.0%

详细报告见前端覆盖率 artifact

✅ 所有检查通过,可以合入

点击 Squash and merge 合并此PR

@Shadow-Azure Shadow-Azure self-assigned this Jun 4, 2026
@Shadow-Azure
Shadow-Azure merged commit 7fdd9ff into main Jun 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant