From 6d91169a6b3855337b32b412caa846db48e42093 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Wed, 23 Nov 2022 22:47:38 +0500 Subject: [PATCH] build: Adding functionality for publishing on pypi --- .github/workflows/pypi-publish.yml | 30 ++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..3aab45a --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,30 @@ +name: Publish package to PyPI + +on: + push: + tags: + - '*' + +jobs: + push: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: setup python + uses: actions/setup-python@v3 + with: + python-version: 3.8 + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_UPLOAD_TOKEN }} diff --git a/setup.py b/setup.py index 7fb58ab..313f774 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup -version = '1.2.0' +version = '1.2.1' description = __doc__.strip().split('\n')[0] this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.rst')) as file_in: