From 17d93d201869cd11ad432f7010b89f847182eee7 Mon Sep 17 00:00:00 2001 From: CoffeeStraw Date: Sun, 11 Apr 2021 18:07:44 +0200 Subject: [PATCH] Implemented build-n-publish job in the CI: now the project will be automatically on PyPI and test PyPI. README.md and setup.py have also been updated. --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ README.md | 32 ++++++------------------------ setup.py | 24 +++++++++++++++++------ 3 files changed, 66 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index daf9a1f5..721782fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,3 +90,45 @@ jobs: - name: Test run: PANGOCAIRO_BACKEND=fc pytest shell: bash + + # Build the package and publish it on PyPi + build-n-publish: + needs: [lint, test] + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + + name: "Build and publish distributions to PyPI and TestPyPI" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 0a6307b2..98c1d166 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,9 @@ - -

- PyonFX Logo -

+

PyonFX Logo

An easy way to create KFX (Karaoke Effects) and complex typesetting using the ASS format (Advanced Substation Alpha).

-

Powered by Python3, PyonFX aims to offer stability, efficiency, and ease of use -to anyone who wants to create something more visually complex within ASS.

- -

- - Python3 - - - Discord Official Server - -

- -

- Documentation • - Contributing • - License • - Acknowledgments -

+

Powered by Python3, PyonFX aims to offer stability, efficiency, and ease of use to anyone who wants to create something more visually complex within ASS.

+ +

Python3Discord Official Server

Showcase of Effects doable with PyonFX

@@ -34,14 +14,14 @@ You can find the full documentation of PyonFX, as well as a quick-start guide an ## Contributing If you want to contribute to PyonFX, please make sure to review the [contribution -guidelines](CONTRIBUTING.md). +guidelines](https://github.com/CoffeeStraw/PyonFX/blob/master/CONTRIBUTING.md). This project makes use of [GitHub issues](https://github.com/CoffeeStraw/PyonFX/issues) for tracking **requests and bugs only**, so please *don't* use issues for general questions and discussion. ## License -This project is licensed under the LGPL v3.0 License — see the [LICENSE](LICENSE) file for further details. +This project is licensed under the LGPL v3.0 License — see the [LICENSE](https://github.com/CoffeeStraw/PyonFX/blob/master/LICENSE) file for further details. ## Acknowledgments diff --git a/setup.py b/setup.py index 30bd33ed..642f6460 100644 --- a/setup.py +++ b/setup.py @@ -35,14 +35,20 @@ def get_requirements(): setuptools.setup( name="pyonfx", - url="https://github.com/CoffeeStraw/PyonFX", + url="https://github.com/CoffeeStraw/PyonFX/", + project_urls={ + "Documentation": "http://pyonfx.rtfd.io/", + "Source": "https://github.com/CoffeeStraw/PyonFX/", + "Tracker": "https://github.com/CoffeeStraw/PyonFX/issues/", + }, author="Antonio Strippoli", author_email="clarantonio98@gmail.com", - version=find_version("pyonfx", "__init__.py"), - license="GNU LGPL 3.0 or later", - description="An easy way to do KFX and complex typesetting based on subtitle format ASS (Advanced Substation Alpha).", + description="An easy way to create KFX (Karaoke Effects) and complex typesetting using the ASS format (Advanced Substation Alpha).", long_description=open("README.md", encoding="utf-8").read(), + long_description_content_type="text/markdown", + version=find_version("pyonfx", "__init__.py"), packages=["pyonfx"], + python_requires=">=3.7", install_requires=get_requirements(), extras_require={ "dev": [ @@ -53,10 +59,16 @@ def get_requirements(): "sphinxcontrib-napoleon", ] }, + keywords="typesetting ass subtitle aegisub karaoke kfx advanced-substation-alpha karaoke-effect", classifiers=[ - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", ], + license="GNU LGPL 3.0 or later", )