Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: release wheel to pypi #134

Merged
merged 1 commit into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PyPI

on:
release:
types: [created]

jobs:
publish:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2

- run: python -m pip install --upgrade pip

- run: pip install -r requirements-dev.txt

- run: make clean

- name: Run twine
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.RABE_PYPI_TOKEN }}
TWINE_NON_INTERACTIVE: true
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ RUN chown -R 1001:0 /tmp/src
USER 1001
# Assemble script sourced from builder image based on user input or image metadata.
# If this file does not exist in the image, the build will fail.
RUN /usr/libexec/s2i/assemble
RUN pip install setuptools-git-versioning \
&& /usr/libexec/s2i/assemble
# Run script sourced from builder image based on user input or image metadata.
# If this file does not exist in the image, the build will fail.
CMD /usr/libexec/s2i/run
Empty file added nowplaying/__init__.py
Empty file.
Empty file added nowplaying/input/__init__.py
Empty file.
Empty file added nowplaying/misc/__init__.py
Empty file.
Empty file added nowplaying/show/__init__.py
Empty file.
Empty file added nowplaying/track/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-r requirements.txt
black==21.12b0
factory-boy==3.2.1
flake8==4.0.1
flake8-debugger==4.0.0
flake8-docstrings==1.6.0
Expand All @@ -12,3 +11,5 @@ pytest==6.2.5
pytest-cov==3.0.0
pytest-env==0.6.2
mock==4.0.3
twine==3.7.1
wheel==0.37.1
20 changes: 9 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from setuptools import setup
"""Set up nowplaying."""

with open("requirements.txt") as f:
requirements = f.read().splitlines()
from setuptools import find_packages, setup

with open("requirements.txt") as file:
requirements = file.read().splitlines()


setup(
Expand All @@ -11,18 +13,14 @@
author="RaBe IT-Reaktion",
author_email="it@rabe.ch",
license="AGPL-3",
version_config=True,
setup_requires=["setuptools-git-versioning"],
install_requires=requirements,
packages=[
"nowplaying",
"nowplaying.misc",
"nowplaying.input",
"nowplaying.track",
"nowplaying.show",
],
packages=find_packages(exclude=("tests",)),
entry_points={"console_scripts": ["now-playing=nowplaying.cli:main"]},
zip_safe=True,
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: AGPL License",
"License :: OSI Approved :: GNU Affero General Public License v3",
],
)