Conversation
- 新增 .github/workflows/ci.yml:push/PR 触发,node --check 校验 lib/*.js 语法并确认发布产物齐全 - 新增 .github/workflows/release.yml:推送 vX.Y.Z tag 时凭 tag 号回写 main 版本、npm Trusted Publishing 发布并生成 Release draft - package.json 补 repository 字段
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.
目的
为
dsh-edit-diff接入 GitHub CI/CD 与 npm 自动发布,并同步修正发布元数据与文档说明。改动内容
新增 GitHub Actions
.github/workflows/ci.yml:push 到 main 或任何 PR 触发。因本插件为纯 JS 零依赖(源码即发布产物),CI 检查改为node --check语法校验 + 发布产物齐全性校验,而非模板的 typecheck/test/build。.github/workflows/release.yml:推送vX.Y.Ztag 触发。凭 tag 号回写package.json版本到main→ 语法/产物校验 →npm publish --provenance走 Trusted Publishing → 生成 GitHub Release draft。修改
package.json:补repository字段,description精简为无括号表述。README.md:移除一条已不准确的「硬性约束」说明。验证
node --checklib/*.js 通过,package.json合法。dsh-edit-diff@0.1.0已发布,Trusted Publishing 已绑定。main并打v*tag 方可触发自动发布;但 CI 文件首次进入远程主分支时,本 PR 本身(push/PR 事件)即会触发一次 ci.yml 校验。合并方式
建议 squash 合并。