diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..b40ba58 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,40 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + diff --git a/setup b/setup new file mode 100755 index 0000000..5594f5f --- /dev/null +++ b/setup @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Stop on errors +set -e + +cd "$(dirname "$0")" + +python3 -m venv venv +source venv/bin/activate + +python3 -m pip install -r requirements.txt diff --git a/setup.py b/setup.py index 42eb108..a89ff61 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,24 @@ #!/usr/bin/env python3 from setuptools import setup -setup(name='pyenvisalink', - version='4.6', - description='A python3 library for running asynchronus communications with envisalink alarm control panel modules.', - url='https://github.com/Cinntax/pyenvisalink', - download_url='https://github.com/ufodone/pyenvisalink/tarball/4.6', - author="David O'Neill", - author_email='ufodone@gmail.com', - license='MIT', - packages=['pyenvisalink'], - classifiers=['Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10'] - ) +setup( + name="pyenvisalink", + version="4.7", + description=( + "A python3 library for running asynchronus communications with envisalink " + "alarm control panel modules." + ), + long_description=( + "A python3 library for running asynchronus communications with envisalink " + "alarm control panel modules." + ), + url="https://github.com/ufodone/pyenvisalink", + author="David O'Neill", + author_email="ufodone@gmail.com", + license="MIT", + packages=["pyenvisalink"], + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3.10", + ], +)