diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 1a3eaf8d..675236f0 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,14 +1,16 @@ name: Publish Python distributions to PyPI and TestPyPI on: - push: - tags: - - '*' + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main jobs: build-n-publish: name: Build and publish Python distributions to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@main - name: Set up Python 3.7 @@ -25,10 +27,10 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true + repository-url: https://test.pypi.org/legacy/ + skip-existing: true - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.pypi_password }} diff --git a/setup.py b/setup.py index a337bcef..b5963e52 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ # ___________________________________________________________________________ from setuptools import setup, find_packages -from distutils.core import Extension +from pathlib import Path DISTNAME = 'gridx-egret' VERSION = '0.5.4.dev0' @@ -30,6 +30,9 @@ 'python_requires' : '>=3.7, <4', } +this_directory = Path(__file__).parent +long_description = (this_directory / 'README.md').read_text() + setup(name=DISTNAME, version=VERSION, packages=PACKAGES, @@ -38,5 +41,7 @@ author=AUTHOR, maintainer_email=MAINTAINER_EMAIL, license=LICENSE, + long_description=long_description, + long_description_content_type='text/markdown', url=URL, **setuptools_kwargs)