From 451b3d3bcff8bf06c6b35e27b382e64747dad416 Mon Sep 17 00:00:00 2001 From: UsamaSadiq Date: Wed, 17 May 2023 19:48:48 +0500 Subject: [PATCH 1/2] fix: add pypi-publish workflow --- .github/workflows/pypi-publish.yml | 31 ++++++++++++++++++++++++++++++ setup.py | 6 ++---- 2 files changed, 33 insertions(+), 4 deletions(-) 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..b221d62 --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,31 @@ +name: Publish package to PyPI + +on: + push: + tags: + - '*' + +jobs: + push: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout Repo + 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 bf2f366..cea2256 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ limitations under the License. """ -from setuptools import setup, find_packages +from setuptools import setup LONG_DESCRIPTION = None README_MARKDOWN = None @@ -60,15 +60,13 @@ def is_requirement(line): setup( name='MongoDBProxy', py_modules=['mongodb_proxy'], - version='0.1.0+edx.2', + version='0.2.0', description='Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.', author='Gustav Arngarden', long_description=LONG_DESCRIPTION, classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.8', From 7bba4f6df03bdde35d102796fd40fea00f5ac5a6 Mon Sep 17 00:00:00 2001 From: UsamaSadiq Date: Thu, 18 May 2023 05:24:47 +0500 Subject: [PATCH 2/2] build: use openedx-mongodbproxy as package name --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cea2256..7af566a 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def is_requirement(line): return line and not line.startswith(('-r', '#', '-e', 'git+', '-c')) setup( - name='MongoDBProxy', + name='openedx-mongodbproxy', py_modules=['mongodb_proxy'], version='0.2.0', description='Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.',