diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000000..4880471726 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,28 @@ +name: Publish to PyPI + +on: push +jobs: + build-and-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.gitignore b/.gitignore index 8aafcf6f6c..8a507ed0eb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__/ *.swo keras_nlp.egg-info/ +dist/ .coverage .coverage.* diff --git a/setup.py b/setup.py index 177ce38f2c..bf41657da5 100644 --- a/setup.py +++ b/setup.py @@ -14,14 +14,21 @@ """Setup script.""" +import pathlib + from setuptools import find_packages from setuptools import setup +HERE = pathlib.Path(__file__).parent +README = (HERE / "README.md").read_text() + setup( name="keras-nlp", description=( "Industry-strength Natural Language Processing extensions for Keras." ), + long_description=README, + long_description_content_type="text/markdown", version="0.1.0", url="https://github.com/keras-team/keras-nlp", author="Keras team",