Skip to content

Commit

Permalink
Merge pull request #9 from streamlit/add-deploy
Browse files Browse the repository at this point in the history
Add publish.yml and update setup.py
  • Loading branch information
sfc-gh-zblackwood authored Sep 26, 2023
2 parents c65a9f0 + 706bb34 commit 0214bf8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Upload Python Package to PyPI when a Release is Created

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-files-connection
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
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@

VERSION = "0.1.0" # PEP-440

NAME = "st_files_connection"
NAME = "st-files-connection"

INSTALL_REQUIRES = [
"streamlit>=1.22",
"fsspec"
]
INSTALL_REQUIRES = ["streamlit>=1.22", "fsspec"]


setuptools.setup(
Expand Down Expand Up @@ -49,5 +46,7 @@
python_requires=">=3.8",
# Requirements
install_requires=INSTALL_REQUIRES,
packages=["st_files_connection"]
)
packages=["st_files_connection"],
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
)

0 comments on commit 0214bf8

Please sign in to comment.