codex-quota-chip 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -29,11 +29,18 @@ zip 里的 `uninstall.ps1 -Purge`,或手动删那个目录。
29
29
 
30
30
  ## 发布(维护者)
31
31
 
32
- `package.json` 的 `version` 必须和 GitHub Release 的 tag(`v<version>`)一致,`sha256`
33
- 必须是该 Release 上 zip 的哈希,否则安装会被自己的校验拦下:
32
+ 发布由 [`.github/workflows/publish.yml`](../.github/workflows/publish.yml) 在 CI 里完成,
33
+ 用 **Trusted Publishing(OIDC)**,仓库和本机都不存 npm token:
34
34
 
35
- ```powershell
36
- npm pack # 本地打 tarball,可先 --prefix 装到临时目录验证
37
- npm login
38
- npm publish
39
- ```
35
+ 1. `..\build-publish.ps1 -Version X.Y.Z` 出新的 zip,记下它的 sha256
36
+ 2. 把本目录 `package.json` 的 `version` 和 `codexQuotaChip.sha256` 一起改成 X.Y.Z / 新哈希,
37
+ 提交
38
+ 3. 建 GitHub Release `vX.Y.Z` 并上传 zip(先建 draft、传完资源再公开,免得 CI 抢跑)
39
+ 4. Release 一公开,tag 就有了,workflow 自动跑:校验 tag 与 version 一致、校验 Release 上的
40
+ zip 哈希与 `package.json` 一致,然后 `npm publish --provenance`
41
+
42
+ `version` 与 tag 不一致、或 zip 哈希对不上时,workflow **会拒绝发布** —— 因为安装脚本就是按
43
+ 自己的 version 去 Release 拼下载地址的,发出去也装不上。
44
+
45
+ 手动补发:Actions → publish → Run workflow,填一个已存在的 tag。
46
+ 绑定关系只能由维护者在 npmjs.com 的包设置里维护(包页 → Settings → Trusted publishing)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-quota-chip",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Windows 任务栏上的 Codex 额度浮窗:装上就有一条 5H/周额度条和右键账号面板",
5
5
  "license": "MIT",
6
6
  "author": "easerlee",
@@ -41,6 +41,6 @@
41
41
  ],
42
42
  "codexQuotaChip": {
43
43
  "_comment": "sha256 of CodexQuotaChip-<version>-win-x64.zip on the matching GitHub release. Bump it together with version, or the install refuses to run the download.",
44
- "sha256": "235bd163fb2f7c54178587ec87b07e1cac4b2527b979a3396fc33ecbafd62bd3"
44
+ "sha256": "6a0982dd1d8fa4e55b75676b7f5deb31fc049beddc9cdc4acc68130bb7157532"
45
45
  }
46
46
  }