diff --git a/CHANGELOG.md b/CHANGELOG.md index fc38178..8ddbb03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.1.3 + +- Published to npm as `dsh-geek2api`: the desktop app's Plugins page can install it by name from the official registry. Updates still download from the Geek2API mirror first. +- Added `RELEASING.md`, the release process. + ## 0.1.2 - Installs and updates no longer depend on reaching GitHub. Every Geek2API entry point serves a mirror of the releases at `/dsh/` (`latest.json`, each `dsh-geek2api-.tgz`, and `dsh-geek2api.tgz`), synced from GitHub every 10 minutes. The version card asks the mirror first through the endpoint pool and installs the mirrored tarball; GitHub is the fallback. Install address: `https://hk.geek2api.com/dsh/dsh-geek2api.tgz`. diff --git a/README.en.md b/README.en.md index 18613b1..ed59710 100644 --- a/README.en.md +++ b/README.en.md @@ -27,7 +27,7 @@ Installing it adds a `Geek2API` group to the model picker. No YAML and no provid ## Install -1. In the desktop app, open **Plugins → Add plugin**, enter `https://hk.geek2api.com/dsh/dsh-geek2api.tgz` (Geek2API's mirror of the GitHub release, reachable from mainland networks; synced every 10 minutes) or `https://github.com/CoderKuo/dsh-geek2api/releases/latest/download/dsh-geek2api.tgz`, and install. No restart is needed for a first install. You can also download the `.tgz` from [Releases](https://github.com/CoderKuo/dsh-geek2api/releases) and install it from a local path. +1. In the desktop app, open **Plugins → Add plugin**, enter `dsh-geek2api` with the official registry (within 24 hours of a release the bundled pnpm refuses it by name; use the mirror address then), or enter `https://hk.geek2api.com/dsh/dsh-geek2api.tgz` (Geek2API's mirror of the GitHub release, reachable from mainland networks; synced every 10 minutes) or `https://github.com/CoderKuo/dsh-geek2api/releases/latest/download/dsh-geek2api.tgz`, and install. No restart is needed for a first install. You can also download the `.tgz` from [Releases](https://github.com/CoderKuo/dsh-geek2api/releases) and install it from a local path. 2. Open **Settings → Geek2API** and paste an API key (create one under API Keys in the Geek2API console). Add more keys for other groups; the plugin picks the right one per model. 3. Pick a model under the `Geek2API` group. diff --git a/README.md b/README.md index f1dd91a..7e0e56f 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,22 @@ ### 1. 安装插件 -打开桌面应用的**插件**页,点击**添加插件**,在**包名或地址**中填入: +打开桌面应用的**插件**页,点击**添加插件**,在**包名或地址**中填入包名,**安装源**选**官方源**: + +```text +dsh-geek2api +``` + +然后点击**安装**。首次安装后不用重启 DSH。 + +> 新版本发布后的 24 小时内,DSH 的包管理器会拒绝按包名安装(报 `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`)。这时改用下面的镜像地址即可;已安装的插件在设置页「更新插件」不受这个限制。 + +也可以填安装地址: ```text https://hk.geek2api.com/dsh/dsh-geek2api.tgz ``` -然后点击**安装**。首次安装后不用重启 DSH。 - 这是 Geek2API 自己的镜像,国内直连就能下载,内容与 GitHub Release 相同(每 10 分钟同步一次);hk2 / hk3 / hk4 换掉域名里的 `hk` 也可以。能访问 GitHub 的话,也可以填 `https://github.com/CoderKuo/dsh-geek2api/releases/latest/download/dsh-geek2api.tgz`,或从 [Releases](https://github.com/CoderKuo/dsh-geek2api/releases) 下载后填本地文件路径。 ### 2. 添加 Key diff --git a/RELEASING.md b/RELEASING.md index 4b0b7f5..fdbae35 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,6 @@ # 发版流程 -dsh-geek2api 通过 **GitHub Release** 发布,不发布到 npm。推送 `v*` tag 后由 GitHub Actions 自动测试、打包、创建 Release;Geek2API 各入口的 `/dsh/` 镜像会在 10 分钟内自动同步,已安装的插件随后就能在设置页一键更新。 +dsh-geek2api 通过 **GitHub Release** 和 **npm**(包名 `dsh-geek2api`,账号 dakuo)发布。推送 `v*` tag 后由 GitHub Actions 自动测试、打包、创建 Release;Geek2API 各入口的 `/dsh/` 镜像会在 10 分钟内自动同步,已安装的插件随后就能在设置页一键更新。 ## 发布链路 @@ -92,7 +92,20 @@ gh release view v<版本> --json assets --jq '[.assets[].name]' # 应当看到 dsh-geek2api-<版本>.tgz 和 dsh-geek2api.tgz ``` -### 6. 确认镜像已同步 +### 6. 发布到 npm + +把 GitHub Actions 打出的**同一个**安装包发到 npm,保证 npm / GitHub / 镜像三处完全一致。本机 npm 全局源是国内镜像(npmmirror),登录和发布都必须显式指定官方源: + +```sh +npm whoami --registry=https://registry.npmjs.org # 未登录就先 npm login --registry=https://registry.npmjs.org +gh release download v<版本> -p "dsh-geek2api-<版本>.tgz" -D .artifacts --clobber +npm publish .artifacts/dsh-geek2api-<版本>.tgz --registry=https://registry.npmjs.org --access public +npm view dsh-geek2api version --registry=https://registry.npmjs.org +``` + +npm 上发布过的版本号**不能删除、不能重用**。新版本发布后 24 小时内,用户在 DSH 插件页按包名安装会被 pnpm 拒绝,这段时间请用户用镜像地址安装。 + +### 7. 确认镜像已同步 镜像最多 10 分钟内同步: @@ -104,7 +117,7 @@ curl -s https://hk.geek2api.com/dsh/latest.json ## 规则 -- **已发布的 tag 和 Release 附件不能改、不能删、不能移动。** 发现问题就发一个新的 patch 版本。 +- **已发布的 tag、Release 附件和 npm 版本不能改、不能删、不能移动。** 发现问题就发一个新的 patch 版本。 - 发版是对外可见的操作:已安装的用户会收到更新提示。 - 不要在 Release 附件或仓库里放任何 API Key、凭据。 - 默认接口地址只能是 geek2api.com 的入口。 @@ -121,6 +134,8 @@ curl -s https://hk.geek2api.com/dsh/latest.json ## 安装地址(给用户) +插件页「官方源」填包名 `dsh-geek2api`;或填镜像地址: + ```text https://hk.geek2api.com/dsh/dsh-geek2api.tgz ``` diff --git a/package.json b/package.json index 2f80732..26337a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-geek2api", - "version": "0.1.2", + "version": "0.1.3", "packageManager": "pnpm@10.32.1", "description": "Use Geek2API API keys in DeepSeek Harness: a built-in multi-protocol model route with key rotation, multi-endpoint failover, and balance display", "type": "module",