refactor: update Python publish workflow to use Poetry for dependency management

This commit is contained in:
deesiigneer
2026-01-17 19:30:51 +00:00
parent 047dbb38d0
commit e9765e8b6a
2 changed files with 31 additions and 20 deletions

View File

@@ -20,17 +20,23 @@ jobs:
python-version: [3.12] python-version: [3.12]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies - name: Install dependencies
run: | run: poetry install --no-interaction
python -m pip install --upgrade pip
pip install twine - name: Build package
- name: Compile package run: poetry build
run: |
python3 setup.py sdist
- name: Publish package - name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1
with: with:

View File

@@ -15,9 +15,14 @@ Repository = "https://github.com/deesiigneer/pyspapi"
"Issue Tracker" = "https://github.com/deesiigneer/pyspapi/issues" "Issue Tracker" = "https://github.com/deesiigneer/pyspapi/issues"
Discord = "https://discord.com/invite/VbyHaKRAaN" Discord = "https://discord.com/invite/VbyHaKRAaN"
[dependency-groups] [project.optional-dependencies]
docs = [
"sphinx>=7,<9",
"sphinx-autobuild>=2025.8.25,<2026.0.0",
"pydata-sphinx-theme>=0.16.1,<0.17.0",
]
dev = ["ruff>=0.14,<0.15", "toml-sort>=0.24,<0.25"] dev = ["ruff>=0.14,<0.15", "toml-sort>=0.24,<0.25"]
docs = ["sphinx>=7,<9", "sphinx-autobuild (>=2025.8.25,<2026.0.0)", "pydata-sphinx-theme (>=0.16.1,<0.17.0)"]
[build-system] [build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"] requires = ["poetry-core>=2.0.0,<3.0.0"]