Skip to content

Commit 76bca76

Browse files
author
iammm0
committed
chore(release): 升至 2.0.1 以解除 npm/GitHub Packages 同版本无法重复发布限制
1 parent fca05ad commit 76bca76

7 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# 自动发布 npm 包 @opensec/secbot(以 2.0.0 / 标签 v2.0.0 为例)
2-
# 1. 确认根目录 package.json 的 version 与即将打的标签一致(如 2.0.0 对应标签 v2.0.0)。
1+
# 自动发布 npm 包 @opensec/secbot(以 2.0.1 / 标签 v2.0.1 为例)
2+
# 1. 确认根目录 package.json 的 version 与即将打的标签一致(如 2.0.1 对应标签 v2.0.1)。
33
# 2. NPM_TOKEN(npm 账号若开启 2FA,必须二选一,否则会报 403:需 bypass 2FA 才能 publish):
44
# · Granular Access Token:Packages 选 Read and write;创建时勾选「允许发布时绕过双因素认证」
55
# (英文界面类似 "Bypass two-factor authentication (2FA) for writes",以 npm 网站为准)。
66
# · 或 Classic Token:类型必须选 Automation(勿用需 OTP 的 Publish 类令牌)。
77
# 权限须覆盖 @opensec;GitHub Secret 名仍为 NPM_TOKEN。
8-
# 3. git tag v2.0.0 && git push origin v2.0.0
8+
# 3. git tag v2.0.1 && git push origin v2.0.1
99
# 将触发:构建 → 校验版本 → 打 GitHub Release 并上传 tgz → npm publish(npmjs)+
1010
# GitHub Packages(仓库 Settings → Packages 可见;包名为 @<仓库所有者>/secbot,与 @opensec/secbot 并存)。
1111
# 工作流 permissions 需含 packages: write(已配置);使用 GITHUB_TOKEN 认证 npm.pkg.github.com。

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
<!-- version list -->
44

5+
## v2.0.1 (2026-04-06)
6+
7+
### Chores
8+
9+
- **release**:版本号递增至 `2.0.1`,因 `2.0.0` 已在 npm / GitHub Packages 存在,无法重复发布同版本。
10+
511
## v1.10.0 (2026-04-03)
612

713
### Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<img src="https://img.shields.io/badge/TypeScript-5.x-3178C6.svg" alt="TypeScript">
1717
</a>
1818
<a href="package.json">
19-
<img src="https://img.shields.io/badge/version-2.0.0-brightgreen.svg" alt="Version">
19+
<img src="https://img.shields.io/badge/version-2.0.1-brightgreen.svg" alt="Version">
2020
</a>
2121
<a href="LICENSE">
2222
<img src="https://img.shields.io/badge/license-Custom-orange.svg" alt="License">

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![Node.js](https://img.shields.io/badge/Node.js-18%2B-339933.svg)](https://nodejs.org/)
88
[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6.svg)](https://www.typescriptlang.org/)
9-
[![Version](https://img.shields.io/badge/version-2.0.0-brightgreen.svg)](package.json)
9+
[![Version](https://img.shields.io/badge/version-2.0.1-brightgreen.svg)](package.json)
1010
[![License](https://img.shields.io/badge/license-Custom-orange.svg)](LICENSE)
1111
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com/iammm0/secbot/releases)
1212
[![NestJS](https://img.shields.io/badge/NestJS-11-E0234E.svg)](https://nestjs.com/)

docs/RELEASE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ GitHub Actions 工作流:
5353

5454
**`NPM_TOKEN` 与 2FA**:若 npm 账号启用了双因素认证,CI 里必须用 **Granular 令牌且允许发布时绕过 2FA**,或 **Classic 的 Automation 令牌**;否则会出现 `403 ... bypass 2fa enabled is required to publish`
5555

56+
**不可覆盖已发布版本**:npm 与 GitHub Packages 均不允许同一版本号二次 `publish`;若 CI 报 `Cannot publish over previously published version`,须将 `package.json``version` 与标签同步抬升(如 `2.0.0``2.0.1`)后再打新标签发布。
57+
5658
### 从 GitHub Packages 安装(可选)
5759

5860
消费方仓库需在 `.npmrc` 中指向 `https://npm.pkg.github.com`,并使用具有 `read:packages` 权限的 **Classic PAT**(或有权读取该包的工作流 token)。包名示例:`@iammm0/secbot`。详见 [Working with the npm registry](https://docs.github.com/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)
@@ -88,7 +90,7 @@ node scripts/release-docs.js version-docs --changelog CHANGELOG.md --output-dir
8890
```bash
8991
node scripts/release-docs.js package-readme \
9092
--changelog CHANGELOG.md \
91-
--version v2.0.0 \
93+
--version v2.0.1 \
9294
--platform windows-amd64 \
9395
--output dist/README_RELEASE.md
9496
```

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensec/secbot",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Secbot pure TypeScript security automation backend and CLI.",
55
"type": "commonjs",
66
"private": false,

0 commit comments

Comments
 (0)