Skip to content

Commit bb86691

Browse files
committed
build: added logic to publish to PyPI
1 parent d331fb2 commit bb86691

File tree

4 files changed

+150
-0
lines changed

4 files changed

+150
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.11"
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build twine
23+
24+
- name: Build package
25+
run: python -m build
26+
27+
- name: Publish to TestPyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
user: __token__
31+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
32+
repository_url: https://test.pypi.org/legacy/
33+
34+
- name: Publish to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
user: __token__
38+
password: ${{ secrets.PYPI_API_TOKEN }}

plex2mix/MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include README.md
2+
include CHANGELOG.md
3+
include LICENSE
4+
include requirements.txt
5+
recursive-include plex2mix *.py
6+
recursive-exclude * __pycache__
7+
recursive-exclude * *.py[co]

plex2mix/init.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""
2+
Plex2Mix - Plex music downloader for DJs
3+
4+
🎵 Download playlists locally with deduplication, export to M3U8/JSON/iTunes
5+
formats, and manage your music library efficiently.
6+
7+
Copyright (C) 2025 anatosun
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with this program. If not, see <https://www.gnu.org/licenses/>.
21+
"""
22+
23+
try:
24+
from ._version import version as __version__
25+
except ImportError:
26+
__version__ = "unknown"
27+
28+
__author__ = "anatosun"
29+
__email__ = "z4jyol8l@duck.com"
30+
__description__ = "Plex music downloader for DJs"
31+
__license__ = "GPL-3.0-or-later"
32+
33+
# Make main CLI function available at package level
34+
from .main import cli
35+
36+
__all__ = ["cli", "__version__"]

pyproject.toml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "plex2mix"
7+
authors = [
8+
{name = "anatosun", email = "z4jyol8l@duck.com"},
9+
]
10+
description = "🎵 Plex2Mix - A powerful Plex music downloader designed for DJs and music enthusiasts. Download playlists locally with track deduplication, export to multiple formats (M3U8, JSON, iTunes XML), and manage your music library with an intuitive interactive CLI. Perfect for importing into Rekordbox, Traktor, Mixxx, or iTunes. "
11+
readme = "README.md"
12+
license = {text = "GPL-3.0-or-later"}
13+
requires-python = ">=3.8"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: End Users/Desktop",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Topic :: Multimedia :: Sound/Audio",
26+
"Topic :: System :: Archiving",
27+
]
28+
keywords = ["plex", "music", "dj", "downloader", "playlist", "m3u8", "itunes"]
29+
dependencies = [
30+
"click>=8.0",
31+
"plexapi>=4.9",
32+
"pyyaml>=6.0",
33+
]
34+
dynamic = ["version"]
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"pytest>=7.0",
39+
"pytest-cov>=4.0",
40+
"black>=22.0",
41+
"flake8>=5.0",
42+
"mypy>=1.0",
43+
"build>=0.8",
44+
"twine>=4.0",
45+
]
46+
47+
[project.urls]
48+
Homepage = "https://github.com/anatosun/plex2mix"
49+
Repository = "https://github.com/anatosun/plex2mix"
50+
Documentation = "https://github.com/anatosun/plex2mix#readme"
51+
"Bug Reports" = "https://github.com/anatosun/plex2mix/issues"
52+
53+
[project.scripts]
54+
plex2mix = "plex2mix.main:cli"
55+
56+
[tool.setuptools]
57+
packages = ["plex2mix"]
58+
59+
[tool.setuptools_scm]
60+
write_to = "plex2mix/_version.py"
61+
62+
[tool.black]
63+
line-length = 88
64+
target-version = ['py38']
65+
66+
[tool.mypy]
67+
python_version = "3.8"
68+
warn_return_any = true
69+
warn_unused_configs = true

0 commit comments

Comments
 (0)