From a9401463880f8c0bc2d0559f4947f9a5f3238268 Mon Sep 17 00:00:00 2001 From: Ben Cutler <90279826+ben-cutler-datarobot@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:02:35 -0500 Subject: [PATCH] [-] Add dr apps to pypi (#63) * [-] Add dr apps to pypi * Add long desc datatype * change long desc --- .github/workflows/push-to-pypi.yaml | 31 +++++++++++++++++++++++++++++ setup.py | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/push-to-pypi.yaml diff --git a/.github/workflows/push-to-pypi.yaml b/.github/workflows/push-to-pypi.yaml new file mode 100644 index 0000000..513284c --- /dev/null +++ b/.github/workflows/push-to-pypi.yaml @@ -0,0 +1,31 @@ +name: Upload Python Package to PyPI when a Release is Created + +on: + release: + types: [created] + +jobs: + pypi-publish: + name: Publish release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/dr-apps + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - name: Build package + run: | + python setup.py sdist bdist_wheel + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/setup.py b/setup.py index 854cfa2..b4dffab 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,8 @@ setup( name=NAME, description='CLI client for custom application in Data Robot', - long_description=open(path.join(path.dirname(__file__), 'README.md')).read(), + long_description=open('README.md').read(), + long_description_content_type='text/markdown', author='Data Robot', url='https://github.com/datarobot/{}'.format(REPO_NAME), packages=find_packages(exclude=['examples']),