Compare commits

..

8 Commits

Author SHA1 Message Date
7da38e0346 🔖 Release 1.0.0.a4 2023-11-14 13:11:46 +08:00
呵呵です
84368a16c3 👷 更改 dependabot 推送分支 2023-11-14 13:44:58 +08:00
6a10ede5ba 👷 更新Release CI 2023-11-14 12:56:06 +08:00
4c205e516f 🔥 去除命令解析失败时发送提醒 2023-11-14 12:54:42 +08:00
c1feccd608 🔖 1.0.0.a3 2023-11-14 09:07:08 +08:00
f27d7b4440 🐛 修复 io record 解析错误的bug 2023-11-14 09:02:22 +08:00
7fa498de48 👽️ io record 添加一个pentas字段 2023-11-14 09:00:35 +08:00
ff7c5847a3 🐛 修复 io record 解析错误的bug 2023-11-14 08:59:44 +08:00
7 changed files with 36 additions and 36 deletions

View File

@@ -7,6 +7,6 @@ version: 2
updates: updates:
- package-ecosystem: "pip" # See documentation for possible values - package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests directory: "/" # Location of package manifests
target-branch: "dev" target-branch: "main"
schedule: schedule:
interval: "daily" interval: "daily"

View File

@@ -8,18 +8,41 @@ on:
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: '3.11' python-version: '3.11'
cache: "poetry"
- name: Install Poetry - name: Install Poetry
shell: bash shell: bash
run: | run: |
pip install poetry pip install poetry
- name: Build
shell: bash
run: |
poetry install poetry install
poetry env use python
poetry publish --build -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }} -n - name: Get Version
id: version
run: |
echo "VERSION=$(poetry version -s)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Check Version
if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
run: exit 1
- name: Build Package
run: poetry build
- name: Publish Package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish Package to GitHub Release
run: gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -3,7 +3,7 @@ from datetime import timedelta
from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option
from nonebot.adapters import Bot, Event from nonebot.adapters import Bot, Event
from nonebot.matcher import Matcher from nonebot.matcher import Matcher
from nonebot_plugin_alconna import AlcMatches, At, on_alconna from nonebot_plugin_alconna import At, on_alconna
from nonebot_plugin_orm import get_session from nonebot_plugin_orm import get_session
from sqlalchemy import select from sqlalchemy import select
@@ -177,11 +177,3 @@ async def _(event: Event, matcher: Matcher, rank: Rank):
@alc.handle() @alc.handle()
async def _(matcher: Matcher, account: MessageFormatError): async def _(matcher: Matcher, account: MessageFormatError):
await matcher.finish(str(account)) await matcher.finish(str(account))
@alc.handle()
async def _(matcher: Matcher, matches: AlcMatches):
if matches.head_matched:
await matcher.finish(
f'{matches.error_info!r}\n' if matches.error_info is not None else '' + '输入"io --help"查看帮助'
)

View File

@@ -19,6 +19,7 @@ class EndContext(BaseModel):
doubles: int doubles: int
triples: int triples: int
quads: int quads: int
pentas: int | None
realtspins: int realtspins: int
minitspins: int minitspins: int
minitspinsingles: int minitspinsingles: int
@@ -32,7 +33,7 @@ class EndContext(BaseModel):
class Garbage(BaseModel): class Garbage(BaseModel):
sent: int sent: int
received: int received: int
attack: int attack: int | None
cleared: int cleared: int
class Finesse(BaseModel): class Finesse(BaseModel):
@@ -45,7 +46,7 @@ class EndContext(BaseModel):
level_lines: int level_lines: int
level_lines_needed: int level_lines_needed: int
inputs: int inputs: int
holds: int holds: int | None
time: Time time: Time
score: int score: int
zenlevel: int zenlevel: int

View File

@@ -1,7 +1,7 @@
from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option
from nonebot.adapters import Bot, Event from nonebot.adapters import Bot, Event
from nonebot.matcher import Matcher from nonebot.matcher import Matcher
from nonebot_plugin_alconna import AlcMatches, At, on_alconna from nonebot_plugin_alconna import At, on_alconna
from nonebot_plugin_orm import get_session from nonebot_plugin_orm import get_session
from ...db import query_bind_info from ...db import query_bind_info
@@ -116,11 +116,3 @@ async def _(event: Event, matcher: Matcher, account: User):
@alc.handle() @alc.handle()
async def _(matcher: Matcher, account: MessageFormatError): async def _(matcher: Matcher, account: MessageFormatError):
await matcher.finish(str(account)) await matcher.finish(str(account))
@alc.handle()
async def _(matcher: Matcher, matches: AlcMatches):
if matches.head_matched:
await matcher.finish(
f'{matches.error_info!r}\n' if matches.error_info is not None else '' + '输入"top --help"查看帮助'
)

View File

@@ -1,7 +1,7 @@
from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option from arclet.alconna import Alconna, Arg, ArgFlag, Args, CommandMeta, Option
from nonebot.adapters import Bot, Event from nonebot.adapters import Bot, Event
from nonebot.matcher import Matcher from nonebot.matcher import Matcher
from nonebot_plugin_alconna import AlcMatches, At, on_alconna from nonebot_plugin_alconna import At, on_alconna
from nonebot_plugin_orm import get_session from nonebot_plugin_orm import get_session
from ...db import query_bind_info from ...db import query_bind_info
@@ -141,11 +141,3 @@ async def _(event: Event, matcher: Matcher, account: User):
@alc.handle() @alc.handle()
async def _(matcher: Matcher, account: MessageFormatError): async def _(matcher: Matcher, account: MessageFormatError):
await matcher.finish(str(account)) await matcher.finish(str(account))
@alc.handle()
async def _(matcher: Matcher, matches: AlcMatches):
if matches.head_matched:
await matcher.finish(
f'{matches.error_info!r}\n' if matches.error_info is not None else '' + '输入"茶服 --help"查看帮助'
)

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = 'nonebot-plugin-tetris-stats' name = 'nonebot-plugin-tetris-stats'
version = '1.0.0.a2' version = '1.0.0.a4'
description = '一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件' description = '一款基于 NoneBot2 的用于查询 Tetris 相关游戏数据的插件'
authors = ['scdhh <wallfjjd@gmail.com>'] authors = ['scdhh <wallfjjd@gmail.com>']
readme = 'README.md' readme = 'README.md'