SuperAPI AI 工具集

asc-plugin-release

部署与运维

查看项目

更新于 10-16 02:28

技能介绍

用途:把 .plugin 插件包发布到 tddworks/asc-registry 市场,使用户可用 asc plugins install --name <id> 安装。

前提:gh CLI 已认证(gh auth status);对 tddworks/asc-registry 有写权限(或 fork + PR);插件含 manifest.json,至少包含 name、version、server 字段;插件可通过 make build 或等效方式构建。

主要流程:1. 找到并读取 manifest.json(plugin/manifest.json 或构建后的 .plugin/manifest.json),读取 name、version、description、author、repositoryURL、categories、server;若 description、author、categories 缺失,先向用户索取。2. 运行 make build 构建,确认 .build/<Name>.plugin/ 内含 manifest.json、<Name>.dylib,可选 ui/。3. 打包:cd .build && zip -r /tmp/<Name>.plugin.zip <Name>.plugin/,用 unzip -l 校验。4. 由插件名派生注册 ID(小写、空格转连字符,如 ASC Pro → asc-pro),并构造注册条目 JSON,downloadURL 指向 https://github.com/tddworks/asc-registry/releases/latest/download/<Name>.plugin.zip;manifest 中没有的 author、repositoryURL、categories 可省略。5. 克隆或拉取 asc-registry,读取 registry.json,新增或按相同 id 替换条目,2 空格缩进写回。6. 用 gh release view 检查 v<version> 发布是否存在,存在则先 gh release delete-asset 再用 gh release upload 替换,不存在则用 gh release create 创建并附加 zip。7. 提交并推送 registry.json。8. 用 curl 校验 registry.json 与下载 URL,并向用户报告注册表 URL、安装命令与 Release URL。

限制:资料未说明收费、价格、支持的平台、构建环境要求或失败回滚方式。缺少 registry 写权限时需 fork + PR 流程,但资料未给出具体 PR 步骤。发布前如缺少 marketplace 字段,应先补全 manifest.json。