Skip to content

Commit cad4764

Browse files
add github files
1 parent afb0ec0 commit cad4764

File tree

5 files changed

+174
-0
lines changed

5 files changed

+174
-0
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Bug 反馈
2+
description: 报告可能的异常行为
3+
title: '[BUG] '
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
欢迎来到 LP 的 Issue Tracker!请填写以下表格来提交 Bug。
10+
- type: input
11+
id: python-version
12+
attributes:
13+
label: Python 版本
14+
description: 可通过 `python --version` 命令查看
15+
placeholder: "3.12"
16+
validations:
17+
required: true
18+
- type: input
19+
id: LP-version
20+
attributes:
21+
label: LP 版本
22+
description: 在插件启动后会输出
23+
placeholder: 1.0.0
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: what-happened
28+
attributes:
29+
label: 发生了什么?
30+
description: 填写你认为的 LP 的不正常行为
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: how-reproduce
35+
attributes:
36+
label: 如何复现
37+
description: 填写应当如何操作才能触发这个不正常行为
38+
placeholder: |
39+
1. xxx
40+
2. xxx
41+
3. xxx
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: what-expected
46+
attributes:
47+
label: 期望的结果?
48+
description: 填写你认为 LP 应当执行的正常行为
49+
validations:
50+
required: true
51+
- type: textarea
52+
id: LP-log
53+
attributes:
54+
label: LP 运行日志
55+
description: 请粘贴插件运行后报错的控制台内容到此
56+
render: shell
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 新功能
2+
description: 您希望LP添加什么新功能
3+
title: '[New Feature] '
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
欢迎来到 LP 新功能提交处。
10+
- type: textarea
11+
id: feature-new-content
12+
attributes:
13+
label: 什么新功能/改进
14+
description: 您需要的新功能/改进
15+
validations:
16+
required: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 提出问题寻求解答
2+
description: 向开发者/其他用户表达您的疑惑并寻求帮助
3+
title: '[Question] '
4+
labels: [question,help wanted]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
来提问吧~
10+
- type: input
11+
id: python-version
12+
attributes:
13+
label: Python 版本
14+
description: 可通过 `python --version` 命令查看
15+
placeholder: "3.12"
16+
validations:
17+
required: true
18+
- type: input
19+
id: LP-version
20+
attributes:
21+
label: LP 版本
22+
description: 在插件启动后会输出(如果没有成功启动可不填)
23+
placeholder: 1.9.0
24+
validations:
25+
required: false
26+
- type: textarea
27+
id: what-happened
28+
attributes:
29+
label: 您遇到了什么问题?
30+
description: 填写你遇到的问题
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: LP-log
35+
attributes:
36+
label: LP 运行日志
37+
description: 请粘贴插件运行后报错的控制台内容到此,如果您认为这有帮助。
38+
render: shell
39+
validations:
40+
required: false

.github/workflows/CI.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master # 指定触发分支
7+
paths:
8+
- '**' # 监控所有文件变更(可按需调整)
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
21+
- name: Set up Python
22+
run: uv python install
23+
24+
- name: Build package
25+
run: uv build # 生成构建产物到dist目录
26+
27+
- name: Save build artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: python-package
31+
path: dist/* # 上传所有构建产物

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to PyPI on Release
2+
3+
on:
4+
release:
5+
types: [created] # 当有新Release创建时触发
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v5
17+
18+
- name: Set up Python
19+
run: uv python install
20+
21+
- name: Check pypi versions
22+
uses: maybe-hello-world/pyproject-check-version@v4
23+
id: versioncheck
24+
with:
25+
pyproject-path: "./pyproject.toml"
26+
27+
- name: Publish to PyPI
28+
if: ${{ steps.versioncheck.outputs.local_version_is_higher == 'true' }}
29+
run: |
30+
uv build
31+
uv publish --token ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)