yuangs 1.3.3 → 1.3.6
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/.github/workflows/publish.yml +30 -5
- package/README.md +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,52 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Auto Bump & Publish
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
- main
|
|
6
|
+
- main # 监听 main 分支的提交
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
publish:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
# 关键权限:允许 Action 修改你的仓库代码(为了回写版本号)
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
11
16
|
steps:
|
|
12
17
|
- name: Checkout repository
|
|
13
18
|
uses: actions/checkout@v3
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub 默认令牌
|
|
14
21
|
|
|
15
22
|
- name: Set up Node.js
|
|
16
23
|
uses: actions/setup-node@v3
|
|
17
24
|
with:
|
|
18
|
-
node-version: '18'
|
|
25
|
+
node-version: '18'
|
|
19
26
|
registry-url: 'https://registry.npmjs.org/'
|
|
20
27
|
|
|
28
|
+
# 1. 配置 Git 身份(机器人身份)
|
|
29
|
+
- name: Configure Git
|
|
30
|
+
run: |
|
|
31
|
+
git config user.name "GitHub Action"
|
|
32
|
+
git config user.email "action@github.com"
|
|
33
|
+
|
|
34
|
+
# 2. 自动增加版本号 (Patch 级别:1.0.0 -> 1.0.1)
|
|
35
|
+
# [skip ci] 是为了防止无限循环触发
|
|
36
|
+
- name: Bump version
|
|
37
|
+
run: |
|
|
38
|
+
npm version patch -m "chore(release): bump version to %s [skip ci]"
|
|
39
|
+
|
|
40
|
+
# 3. 把新的版本号推送到 GitHub 仓库
|
|
41
|
+
- name: Push changes
|
|
42
|
+
run: git push
|
|
43
|
+
|
|
44
|
+
# 4. 安装依赖
|
|
21
45
|
- name: Install dependencies
|
|
22
46
|
run: npm ci
|
|
23
47
|
|
|
48
|
+
# 5. 发布到 npm
|
|
24
49
|
- name: Publish to npm
|
|
25
|
-
run: npm publish
|
|
50
|
+
run: npm publish --provenance
|
|
26
51
|
env:
|
|
27
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
52
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Pong 游戏: https://wealth.want.biz/pages/pong.html
|
|
|
55
55
|
|
|
56
56
|
### v1.2.0 (2025-11-29)
|
|
57
57
|
|
|
58
|
-
* **新增** AI 命令交互模式:直接输入 `yuangs ai`
|
|
58
|
+
* **新增** AI 命令交互模式:直接输入 `yuangs ai` 即可进入一问一答模式,无需每次输入问题,quit或exit可退出。
|
|
59
59
|
* **新增** AI 命令模型参数 `-m` 简写:支持 `-m <模型名称>` 代替 `--model <模型名称>`。
|
|
60
60
|
* **新增** `help` 命令显示仓库地址:方便用户直接访问项目仓库。
|
|
61
61
|
* **优化** AI 请求错误提示:在处理 AI 请求出错时,提供更清晰的错误信息。
|