From cc13a7535cd6edaf3c9af75227f747b3889f506f Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Tue, 23 Sep 2025 04:20:25 -0300 Subject: [PATCH] chore: updates build process --- .github/workflows/build-and-uplod.yml | 8 +++++--- pyproject.toml | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-uplod.yml b/.github/workflows/build-and-uplod.yml index 201a3e0..4ca8c44 100644 --- a/.github/workflows/build-and-uplod.yml +++ b/.github/workflows/build-and-uplod.yml @@ -27,19 +27,21 @@ jobs: uses: actions/setup-python@v3 with: python-version: "3.10" + - name: Install dependencies - run: | - poetry self add "poetry-dynamic-versioning[plugin]" - if [ -f pyproject.toml ]; then poetry install; fi + run: poetry install + - name: Build Python Package run: | poetry build -f sdist poetry install echo "Builded DicePlayer - $(poetry version)" + - name: Configure PyPI run: | poetry config repositories.pypi https://upload.pypi.org/legacy/ poetry config pypi-token.pypi ${{secrets.PYPI_TOKEN}} + - name: Upload Python Package run: | poetry publish --repository pypi \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d9e3c51..9533f73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [project] name = "diceplayer" -version = "0.0.0" description = "" authors = [ {name="Vitor Hideyoshi", email="vitor.h.n.batista@gmail.com"}, @@ -9,6 +8,7 @@ authors = [ license = "GPL-2.0-only" readme = "README.md" dynamic = [ + "version", "dependencies", "requires-python" ] @@ -19,6 +19,7 @@ diceplayer = "diceplayer.__main__:main" # POETRY [tool.poetry] +version = "0.0.0" packages = [ { include = "diceplayer" } ] @@ -38,12 +39,15 @@ black = "^24.4.2" pre-commit = "^3.7.1" poethepoet = "^0.27.0" +[tool.poetry.requires-plugins] +poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] } + [tool.poetry-dynamic-versioning] enable = true vcs = "git" [build-system] -requires = ["poetry-core"] +requires = ["poetry-core", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] build-backend = "poetry_dynamic_versioning.backend"