From 11564b05434db589fd1227d12188f4f0a1bb88ef Mon Sep 17 00:00:00 2001 From: Xoconoch Date: Fri, 15 Aug 2025 19:51:54 -0500 Subject: [PATCH] Publish package to pypi --- .github/workflows/publish.yml | 35 +++++++++++++++++++++ pyproject.toml | 3 ++ setup.cfg | 25 +++++++++++++++ spotizerr_auth/__init__.py | 0 spotizerr-auth.py => spotizerr_auth/main.py | 0 5 files changed, 63 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 pyproject.toml create mode 100644 setup.cfg create mode 100644 spotizerr_auth/__init__.py rename spotizerr-auth.py => spotizerr_auth/main.py (100%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..70a2739 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*.*.*" # Triggers only on version tags + +permissions: + contents: read + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8fe2f47 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0408f6b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,25 @@ +[metadata] +name = spotizerr-auth +version = 1.0.0 +author = spotizerr-dev +description = A Spotizerr authentication utility for configuring Spotify credentials +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/Xoconoch/spotizerr-auth +license = GPL-3.0-or-later +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) + Operating System :: OS Independent + +[options] +packages = find: +python_requires = >=3.7 +install_requires = + librespot-spotizerr==0.3.0 + requests + rich + +[options.entry_points] +console_scripts = + spotizerr-auth=spotizerr_auth.main:main diff --git a/spotizerr_auth/__init__.py b/spotizerr_auth/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/spotizerr-auth.py b/spotizerr_auth/main.py similarity index 100% rename from spotizerr-auth.py rename to spotizerr_auth/main.py