everkm-publish 0.17.0 → 0.17.1
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.
- package/README-MAINTAINERS.md +61 -0
- package/README.md +2 -32
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
本仓库即 [`everkm/publish`](https://github.com/everkm/publish)(`everkm-publish-npm` 仅为本地/历史别名)。
|
|
4
|
+
|
|
5
|
+
## Release
|
|
6
|
+
|
|
7
|
+
1. **Binary Release** — tag 触发构建并发布 GitHub Release(含 notes):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git tag everkm-publish@v0.17.0
|
|
11
|
+
git push origin everkm-publish@v0.17.0
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
等待构建完成,确认 Release 资产与 notes。
|
|
15
|
+
|
|
16
|
+
2. **CDN + npm** — semver tag 触发 CDN 镜像与 npm publish:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git tag v0.17.0
|
|
20
|
+
git push origin v0.17.0
|
|
21
|
+
|
|
22
|
+
# or via Makefile
|
|
23
|
+
make tag TAG=v0.17.0
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Verify:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
curl -s https://ekmp-assets.everkm.com/pkgs/latest.json
|
|
30
|
+
npm view everkm-publish version
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Manual re-run: GitHub Actions → **Publish NPM Package** → `workflow_dispatch`.
|
|
34
|
+
|
|
35
|
+
## GitHub Secrets
|
|
36
|
+
|
|
37
|
+
| Secret | 用途 |
|
|
38
|
+
|--------|------|
|
|
39
|
+
| `CF_S3_AK` / `CF_S3_SK` | Cloudflare R2 上传 |
|
|
40
|
+
| `QINIU_ACCESS_KEY` / `QINIU_SECRET_KEY` | 七牛上传与 CDN 刷新 |
|
|
41
|
+
| `GH_TOKEN` | 读取同仓 GitHub Release(未设置时回退 `GITHUB_TOKEN`) |
|
|
42
|
+
| `NPM_TOKEN` | npm publish(见下) |
|
|
43
|
+
| `NOTIFY_DAYU_ENDPOINT` | workflow 结束 Telegram 通知(可选) |
|
|
44
|
+
|
|
45
|
+
### `NPM_TOKEN` 配置
|
|
46
|
+
|
|
47
|
+
CI 无法输入 authenticator 验证码;若账号启用了 2FA,token **必须**支持自动化发布,否则 `npm publish` 会报 `EOTP`。
|
|
48
|
+
|
|
49
|
+
在 [npmjs.com](https://www.npmjs.com) → **Access Tokens** 创建 **Granular Access Token**(或 Classic **Automation** token):
|
|
50
|
+
|
|
51
|
+
1. **Packages and scopes**:对 `everkm-publish` 授予 **Read and write**(或 all packages)
|
|
52
|
+
2. **Security settings**:勾选 **Bypass two-factor authentication (2FA)**
|
|
53
|
+
3. 若包归属 npm organization,还需在 **Organizations** 中授权对应 org
|
|
54
|
+
|
|
55
|
+
将 token 写入仓库 **Settings → Secrets → Actions → `NPM_TOKEN`**。更新后重新跑 workflow 即可。
|
|
56
|
+
|
|
57
|
+
本地验证 token:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm whoami --registry=https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=YOUR_TOKEN
|
|
61
|
+
```
|
package/README.md
CHANGED
|
@@ -14,36 +14,6 @@ pnpm add everkm-publish
|
|
|
14
14
|
|
|
15
15
|
`postinstall` downloads the platform binary from CDN (`.com` → GitHub → `.cn`), with a 5s timeout per source.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
---
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
1. **Binary Release** — tag 触发构建并发布 GitHub Release(含 notes):
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
git tag everkm-publish@v0.17.0
|
|
25
|
-
git push origin everkm-publish@v0.17.0
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
等待构建完成,确认 Release 资产与 notes。
|
|
29
|
-
|
|
30
|
-
2. **CDN + npm** — semver tag 触发 CDN 镜像与 npm publish:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
git tag v0.17.0
|
|
34
|
-
git push origin v0.17.0
|
|
35
|
-
|
|
36
|
-
# or via Makefile
|
|
37
|
-
make tag TAG=v0.17.0
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
3. Verify:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
curl -s https://ekmp-assets.everkm.com/pkgs/latest.json
|
|
44
|
-
npm view everkm-publish version
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Manual re-run: GitHub Actions → **Publish NPM Package** → `workflow_dispatch`.
|
|
48
|
-
|
|
49
|
-
Required secrets: `CF_S3_AK`, `CF_S3_SK`, `QINIU_ACCESS_KEY`, `QINIU_SECRET_KEY`, `GH_TOKEN`, `NPM_TOKEN`, `NOTIFY_DAYU_ENDPOINT`。
|
|
19
|
+
Maintainers: see [README-MAINTAINERS.md](./README-MAINTAINERS.md).
|