From 85cda45b75204447d77ac75b3bd727d694c8d89f Mon Sep 17 00:00:00 2001 From: Lukas Kluft Date: Fri, 17 Jan 2020 09:23:14 +0100 Subject: [PATCH 1/2] Add long description Use the content of `README.md` as long description for PyPI. --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index f9d07177..86810a93 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,9 @@ sys.exit('Only support Python version >=3.5.1\n' 'Found version is {}'.format(sys.version)) +with open('README.md') as f: + long_description = f.read() + setup( name='konrad', author='The konrad developers', @@ -20,6 +23,8 @@ packages=find_packages(), license='MIT', description='Implementation of a radiative-convective equilibrium model.', + long_description=long_description, + long_description_content_type='text/markdown', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', From cda9ce86d948cf3f367b5e4ac02d4f3b638b036a Mon Sep 17 00:00:00 2001 From: Lukas Kluft Date: Fri, 17 Jan 2020 09:25:26 +0100 Subject: [PATCH 2/2] Add GitHub workflow for autmoated PyPI release --- .github/workflows/python-publish.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 00000000..b143a530 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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 setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*