From ea3e48a83809735511b0460914aea1f6fc87c399 Mon Sep 17 00:00:00 2001 From: Snowykami Date: Mon, 28 Apr 2025 21:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=20.gitignore?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=20main=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=20pyproject.toml=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20Liteyuki=20PyPI=20=E5=8F=91=E5=B8=83=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/liteyuki-pypi-publish.yaml | 25 ++++++++++++++++++++ .gitignore | 6 ++++- main | 10 -------- pyproject.toml | 21 +++++++++++++++- t_module/__init__.py | 4 ---- 5 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/liteyuki-pypi-publish.yaml delete mode 100644 main delete mode 100644 t_module/__init__.py diff --git a/.github/workflows/liteyuki-pypi-publish.yaml b/.github/workflows/liteyuki-pypi-publish.yaml new file mode 100644 index 0000000..463d5dc --- /dev/null +++ b/.github/workflows/liteyuki-pypi-publish.yaml @@ -0,0 +1,25 @@ +name: Publish to Liteyuki PyPI + +on: + push: + tags: + - 'v*' + +jobs: + liteyuki-pypi-publish: + name: Upload release to PyPI + runs-on: liteyukios-latest + + steps: + - uses: actions/checkout@master + + - name: Setup uv + uses: astral-sh/setup-uv@v6 + with: + version: "latest" + + - name: Build and publish + run: | + uv build + uv publish --index liteyuki-pypi + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 811c326..6f490a7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,8 @@ Thumbs.db .env .env.* plugins/ -data/ \ No newline at end of file +data/ + +# pdm +.pdm-build/ +dist/ \ No newline at end of file diff --git a/main b/main deleted file mode 100644 index 7ad5bae..0000000 --- a/main +++ /dev/null @@ -1,10 +0,0 @@ -2025-04-28 01:58:50.080 | DEBUG | __main__:main:6 - This is a debug message -2025-04-28 01:58:50.080 | INFO | __main__:main:7 - This is an info message -2025-04-28 01:58:50.080 | WARNING | __main__:main:8 - This is a warning message -2025-04-28 01:58:50.080 | ERROR | __main__:main:9 - This is an error message -2025-04-28 01:58:50.080 | CRITICAL | __main__:main:10 - This is a critical message -2025-04-28 01:58:50.839 | DEBUG | __main__:main:6 - This is a debug message -2025-04-28 01:58:50.839 | INFO | __main__:main:7 - This is an info message -2025-04-28 01:58:50.839 | WARNING | __main__:main:8 - This is a warning message -2025-04-28 01:58:50.839 | ERROR | __main__:main:9 - This is an error message -2025-04-28 01:58:50.839 | CRITICAL | __main__:main:10 - This is a critical message diff --git a/pyproject.toml b/pyproject.toml index 0220b0c..f9ceb0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "yukilog" -version = "0.1.0" +dynamic = ["version"] description = "Add your description here" readme = "README.md" requires-python = ">=3.12" @@ -13,3 +13,22 @@ dev = [ "mypy>=1.15.0", "pytest>=8.3.5", ] + +[build-system] +requires = ["pdm-backend >= 2.4.0"] +build-backend = "pdm.backend" + +[tool.setuptools] +packages = ["yukilog"] + +[tool.pdm.version] +source = "scm" +tag_filter = "v*" +tag_regex = '^v(?:\D*)?(?P([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|c|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$)$' +fallback_version = "0.1.0" + +[[tool.uv.index]] +name = "liteyuki-pypi" +url = "https://git.liteyuki.icu/api/packages/LiteyukiStudio/pypi/simple" +publish-url = "https://git.liteyuki.icu/api/packages/LiteyukiStudio/pypi" +explicit = true \ No newline at end of file diff --git a/t_module/__init__.py b/t_module/__init__.py deleted file mode 100644 index 0ea0b16..0000000 --- a/t_module/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ - - -def print_message(logger): - logger.success("This is a success message") \ No newline at end of file