Skip to content

chore: release pipeline and independent versioning - #1

Merged
iamhyc merged 1 commit into
mainfrom
chore/release-pipeline
Oct 19, 2026
Merged

iamhyc merged 1 commit into
mainfrom
chore/release-pipeline

Conversation

@iamhyc

@iamhyc iamhyc commented Oct 19, 2026

Copy link
Copy Markdown
Member

内容

发布流水线与版本策略,扩展独立版本号,不与 hvolt 对齐。

为什么独立

hvolt 按目标 SDK 编号(26.0.0-0,见其 RELEASING.md);本扩展绑定的是 VS Code API(engines.vscode ^1.85.0)与它讲的 LSP 协议。共用一套号会暗示一个双方都保证不了的兼容性,而且会让一个纯 UI 修复必须等 SDK 发版才能出。

兼容性用声明而不是版本号

  • engines.vscode:宿主最低版本
  • README 与 RELEASING.md 写明 requires hvolt 26.0.0 or newer(第一个带 hvolt lsp --stdio 的版本)
  • 抬高最低 hvolt 版本属于破坏性变更,pre-1.0 期间走 minor

流水线

  • ci.yml:每个 PR 跑 tsc --noEmit、node build.mjs、node --test test/,并用 vsce ls 检查清单
  • release.yml:推 v* tag → 校验 tag 与 package.json 版本一致 → 打 .vsix → 挂到 GitHub Release → 仅在存在 VSCE_PAT secret 时发布到 Marketplace;workflow_dispatch 默认 dry_run=true,不发布

其他

  • 新增 RELEASING.md、CHANGELOG.md;package.json 增加 test、package 脚本
  • test/manifest.test.mjs 的命令冲突检查:服务器不在本仓库,因此默认对快照校验,设置 HVOLT_REPO 指向 hvolt 检出时改为核对真实源码
  • .vscodeignore 排除 .github/、.gitignore、RELEASING.md

本地读数

tsc --noEmit        rc=0
node build.mjs      rc=0
node --test test/   7 passed
vsce ls             7 个文件(含 dist/extension.js,无 .github/.gitignore/RELEASING.md)
workflow YAML       解析通过:ci(extension)、release(release)

合并方式

squash(仓库规则)。合并后打 v0.1.0 即产生第一个 release。

The extension is versioned on its own line: `hvolt` numbers its releases after the SDK it
targets (`26.0.0-0`), while this package is bound to the VS Code API it compiles against
and to the LSP protocol it speaks. Sharing a number would promise a compatibility neither
side can keep and would hold a UI fix until an SDK release.

Compatibility is declared instead: `engines.vscode`, plus "requires hvolt 26.0.0 or newer"
in the README and RELEASING.md — the first release with `hvolt lsp --stdio`.

- `.github/workflows/ci.yml`: typecheck, build, tests on every pull request, and
  `vsce ls` so the manifest is checked before a release rather than at one.
- `.github/workflows/release.yml`: tag `v*` → verify the tag equals `package.json`'s
  version, package the `.vsix`, attach it to the GitHub release, and publish to the
  Marketplace only when a `VSCE_PAT` secret exists. `workflow_dispatch` stops before
  publishing by default.
- `RELEASING.md`, `CHANGELOG.md`; `package.json` gains `test` and `package` scripts.
- `test/manifest.test.mjs`: the command-collision check reads the server source only when
  `HVOLT_REPO` points at a checkout; otherwise it verifies against a snapshot of the
  commands the server advertised, because the server does not live in this repository.
- `.vscodeignore`: keep `.github/`, `.gitignore` and `RELEASING.md` out of the package
  (measured with `vsce ls`: 7 files, `dist/extension.js` included).
@iamhyc
iamhyc merged commit 3e116eb into main Oct 19, 2026
1 check passed
@iamhyc
iamhyc deleted the chore/release-pipeline branch October 19, 2026 12:21
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