From 7ba3d78ba3b61e0b4b8f812e8b5b0c4640c893d8 Mon Sep 17 00:00:00 2001 From: Zachary Blackwood Date: Thu, 7 Sep 2023 10:00:37 -0400 Subject: [PATCH 1/2] Add pypi publish workflow --- .github/workflows/publish.yml | 0 setup.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index f0a6263..7406a40 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ import setuptools -with open("README.md", "r", encoding='utf8') as fh: +with open("README.md", "r", encoding="utf8") as fh: long_description = fh.read() setuptools.setup( name="st-annotated-text", - version="4.0.0", + version="4.0.1", author="Thiago Teixeira", author_email="me@thiagot.com", description="A simple component to display annotated text in Streamlit apps.", @@ -20,5 +20,5 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ], - python_requires='>=3.5', + python_requires=">=3.5", ) From 69b4ba3df58998c93372e49a048848511f84d254 Mon Sep 17 00:00:00 2001 From: Zachary Blackwood Date: Thu, 7 Sep 2023 10:01:40 -0400 Subject: [PATCH 2/2] Add yml --- .github/workflows/publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e69de29..c568720 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + pypi-publish: + name: Publish release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/st-annotated-text + 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