Skip to content

Commit 2e9ea8d

Browse files
authored
Setup publish to pypi (#74)
1 parent a266926 commit 2e9ea8d

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to PyPI
2+
3+
on: push
4+
jobs:
5+
build-and-publish:
6+
name: Build and publish to PyPI
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Install pypa/build
11+
run: >-
12+
python -m
13+
pip install
14+
build
15+
--user
16+
- name: Build a binary wheel and a source tarball
17+
run: >-
18+
python -m
19+
build
20+
--sdist
21+
--wheel
22+
--outdir dist/
23+
.
24+
- name: Publish distribution to PyPI
25+
if: startsWith(github.ref, 'refs/tags')
26+
uses: pypa/gh-action-pypi-publish@master
27+
with:
28+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__/
88
*.swo
99

1010
keras_nlp.egg-info/
11+
dist/
1112

1213
.coverage
1314
.coverage.*

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@
1414

1515
"""Setup script."""
1616

17+
import pathlib
18+
1719
from setuptools import find_packages
1820
from setuptools import setup
1921

22+
HERE = pathlib.Path(__file__).parent
23+
README = (HERE / "README.md").read_text()
24+
2025
setup(
2126
name="keras-nlp",
2227
description=(
2328
"Industry-strength Natural Language Processing extensions for Keras."
2429
),
30+
long_description=README,
31+
long_description_content_type="text/markdown",
2532
version="0.1.0",
2633
url="https://github.com/keras-team/keras-nlp",
2734
author="Keras team",

0 commit comments

Comments
 (0)