Merge pull request 'Fix #5: Prepare package for PyPI publishing' (#13) from fix/issue-5 into main

Reviewed-on: https://git.example.com/jarianc/youtube-cli/pulls/13
This commit is contained in:
Jarian Cottingham 2026-07-05 01:48:55 -05:00
commit 3adafe8bbd
5 changed files with 84 additions and 10 deletions

View File

@ -0,0 +1,38 @@
name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
env:
GITEA_URL: https://git.example.com
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Clone repo
run: |
rm -rf $GITHUB_WORKSPACE/*
git clone --depth 1 $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
git -C $GITHUB_WORKSPACE checkout $GITHUB_SHA 2>/dev/null || true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- 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
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 jarianc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

10
MANIFEST.in Normal file
View File

@ -0,0 +1,10 @@
include README.md
include LICENSE
include pyproject.toml
include requirements.txt
recursive-include youtube_cli *.py
recursive-include youtube_tui *.py
recursive-include tests *.py
global-exclude __pycache__
global-exclude *.py[cod]
global-exclude .venv

View File

@ -9,7 +9,7 @@ description = "A command-line interface for browsing and downloading YouTube vid
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "Your Name", email = "your.email@example.com"},
{name = "jarianc", email = "user@example.com"},
]
license = {text = "MIT"}
classifiers = [
@ -43,8 +43,10 @@ youtube-cli = "youtube_cli.main:main"
youtube-tui = "youtube_tui.__main__:main"
[project.urls]
Homepage = "https://github.com/yourusername/youtube-cli"
Issues = "https://github.com/yourusername/youtube-cli/issues"
Homepage = "https://git.example.com/jarianc/youtube-cli"
Issues = "https://git.example.com/jarianc/youtube-cli/issues"
Documentation = "https://git.example.com/jarianc/youtube-cli"
Source = "https://git.example.com/jarianc/youtube-cli"
[project.optional-dependencies]
dev = [

View File

@ -6,12 +6,18 @@ with open("README.md", "r", encoding="utf-8") as fh:
setup(
name="youtube-cli",
version="0.1.0",
author="Your Name",
author_email="your.email@example.com",
author="jarianc",
author_email="user@example.com",
description="A command-line interface for browsing and downloading YouTube videos",
keywords="youtube, cli, download, video, yt-dlp, tui, terminal",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/yourusername/youtube-cli",
url="https://git.example.com/jarianc/youtube-cli",
project_urls={
"Documentation": "https://git.example.com/jarianc/youtube-cli",
"Issue Tracker": "https://git.example.com/jarianc/youtube-cli/issues",
"Source": "https://git.example.com/jarianc/youtube-cli",
},
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
@ -26,16 +32,13 @@ setup(
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
python_requires=">=3.7",
python_requires=">=3.10",
install_requires=[
"yt-dlp",
"rich>=13.0.0",