diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..863debe --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,27 @@ +name: Publish to PyPi + +on: + release: + types: [created] + +jobs: + deploy: + name: Build and publish Python distributions to PyPi + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install wheel twine pep517 + - name: Build a binary wheel and source tarball + run: | + python -m pep517.build --source --binary --out-dir dist/ . + - name: Publish distributions to PyPi + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} diff --git a/pyproject.toml b/pyproject.toml index aa91e25..71badea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,21 +6,17 @@ build-backend = "flit_core.buildapi" [tool.flit.metadata] module = "rocketchat" -dist-name = "rocketchat-api" author = "Brendan Abel" author-email = "007brendan@gmail.com" home-page = "https://github.com/bpabel/rocketchat" description-file = "README.md" -requires-python = ">=2.7" +requires-python = ">=3.6" requires = ["requests >=2,<3"] -keywords = "rocketchat,chat" +keywords = "rocketchat,chat,api" classifiers = [ "License :: OSI Approved :: MIT License", ] [tool.flit.metadata.requires-extra] -test = [ - "pytest", - "mock", -] +test = ["pytest", "mock"] doc = ["sphinx"] diff --git a/rocketchat/rocketchat.py b/rocketchat/rocketchat.py index 533dfb2..6b52497 100644 --- a/rocketchat/rocketchat.py +++ b/rocketchat/rocketchat.py @@ -27,7 +27,6 @@ """ -from __future__ import absolute_import, division, print_function, unicode_literals from pprint import pprint import inspect import json