1
0
forked from bot/app

🚸 添加发布工作流

This commit is contained in:
远野千束 2024-08-18 01:25:11 +08:00
parent 8d78e643e0
commit 0e125f7c81
8 changed files with 66 additions and 64 deletions

26
.github/workflows/pypi-publish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish
on:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:
jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# 这个权限是为了私有仓库。
contents: read
# 重要提示:这个权限对于可信发布是必需的。
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- name: Publish package distributions to PyPI
run: pdm publish

4
.gitignore vendored
View File

@ -44,3 +44,7 @@ prompt.txt
# js
**/echarts.js
.env
# pdm
.pdm-python

View File

@ -10,11 +10,10 @@ from typing import Any, Optional
from liteyuki.bot.lifespan import (LIFESPAN_FUNC, Lifespan)
from liteyuki.comm.channel import get_channel
from liteyuki.comm.storage import shared_memory
from liteyuki.utils import IS_MAIN_PROCESS
from liteyuki.core.manager import ProcessManager
from liteyuki.log import init_log, logger
from liteyuki.plugin import load_plugins
from liteyuki.utils import IS_MAIN_PROCESS
__all__ = [
"LiteyukiBot",

View File

@ -2,7 +2,6 @@
此模块用于注册观察者函数使用watchdog监控文件变化并重启bot
启用该模块需要在配置文件中设置`dev_mode`为True
"""
import functools
import time
from typing import Callable, TypeAlias

View File

@ -13,8 +13,7 @@ import traceback
from pathlib import Path
from typing import Optional
from nonebot import logger
from liteyuki.log import logger
from liteyuki.plugin.model import Plugin, PluginMetadata
from importlib import import_module
@ -23,8 +22,8 @@ from liteyuki.utils import path_to_module_name
_plugins: dict[str, Plugin] = {}
__all__ = [
"load_plugin",
"load_plugins",
"load_plugin",
"load_plugins",
]

View File

@ -8,13 +8,11 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@File : __init__.py.py
@Software: PyCharm
"""
from liteyuki import get_config, load_plugin, get_bot
from liteyuki import get_config, load_plugin
from liteyuki.plugin import PluginMetadata, load_plugins
__plugin_meta__ = PluginMetadata(
name="外部轻雪插件加载器",
version="0.1.0",
author="snowykami",
description="插件加载器,用于加载轻雪原生插件"
)

View File

@ -1,58 +1,36 @@
# PEP 621 project metadata
# See https://www.python.org/dev/peps/pep-0621/
# This file is for project use, but don`t use with nb-cli
# 此文件为项目所用请不要和nb-cli一起使用以防被修改
[tool.poetry]
name = "liteyuki-bot"
version = "6"
description = "based on nonebot2"
authors = ["Snowykami"]
license = "MIT & LSO"
package-mode = false
# This file is liteyuki framework use only, don`t use it with applications or nb-cli.
# 此文件仅供 liteyuki 框架使用请勿用于应用程序及nb-cli请使用pip进行安装。
[project]
name = "liteyukibot"
version = "6.3.2"
description = "A lightweight bot process management framework and application."
readme = "README.md"
requires-python = ">=3.10"
authors = [
{ name = "snowykami", email = "snowykami@outlook.com" },
{ name = "LiteyukiStudio", email = "studio@liteyuki.icu" },
]
license = { text = "MIT&LSO" }
#[tool.poetry.dependencies]
#python = "^3.10"
#aiofiles = "~23.2.1"
#aiohttp = "~3.9.3"
#aiosqlite3 = "~0.3.0"
#colored = "~2.2.4"
#fastapi = "~0.110.0"
#GitPython = "~3.1.42"
#httpx = "~0.27.0"
#importlib_metadata = "~7.0.2"
#jieba = "~0.42.1"
#loguru = "~0.7.2"
#nb-cli = "~1.4.1"
#nonebot-adapter-onebot = "~2.4.3"
#nonebot-adapter-satori = "~0.11.5"
#nonebot-plugin-alconna = "~0.46.3"
#nonebot-plugin-apscheduler = "~0.4.0"
#nonebot-plugin-htmlrender = "~0.3.1"
#nonebot2 = { version = "~2.3.0", extras = ["fastapi", "httpx", "websockets"] }
#numpy = "~2.0.0"
#packaging = "~23.1"
#psutil = "~5.9.8"
#py-cpuinfo = "~9.0.0"
#pydantic = "~2.7.0"
#Pygments = "~2.17.2"
#python-dotenv = "~1.0.1"
#pytest = "~8.3.1"
#pytz = "~2024.1"
#PyYAML = "~6.0.1"
#requests = "~2.31.0"
#starlette = "~0.36.3"
#watchdog = "~4.0.0"
[[tool.poetry.source]]
name = "tuna"
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
[tool.nonebot]
dependencies = [
"loguru~=0.7.2",
"pydantic==2.8.2",
"PyYAML==6.0.2",
"toml==0.10.2",
"watchdog==4.0.1",
]
[project.urls]
homepage = "https://bot.liteyuki.icu"
repository = "https://github.com/LiteyukiStudio/LiteyukiBot"
documentation = "https://bot.liteyuki.icu"
Homepage = "https://bot.liteyuki.icu"
Repository = "https://github.com/LiteyukiStudio/LiteyukiBot"
"Issue Tracker" = "https://github.com/LiteyukiStudio/LiteyukiBot/issues/new?assignees=&labels=&projects=&template=%E9%97%AE%E9%A2%98%E5%8F%8D%E9%A6%88.md&title="
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
includes = ["liteyuki"]

View File

@ -16,5 +16,4 @@ __plugin_meta__ = PluginMetadata(
"toggleable" : True,
"default_enable": True,
}
)
print(get_bot())
)