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

@@ -17,22 +17,28 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
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 }}
uses: actions/setup-python@v2 - name: Set up Python ${{ matrix.python-version }}
with: uses: actions/setup-python@v2
python-version: ${{ matrix.python-version }} with:
- name: Install dependencies python-version: ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip - name: Install Poetry
pip install twine run: |
- name: Compile package curl -sSL https://install.python-poetry.org | python3 -
run: | echo "$HOME/.local/bin" >> $GITHUB_PATH
python3 setup.py sdist
- name: Publish package - name: Install dependencies
uses: pypa/gh-action-pypi-publish@release/v1 run: poetry install --no-interaction
with:
user: __token__ - name: Build package
password: ${{ secrets.PYPI_API_TOKEN }} run: poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

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"]