From 9af73c15d119d8c92f3b0bcd2584fff9f90eeacc Mon Sep 17 00:00:00 2001 From: IBMC265 Date: Tue, 24 Sep 2024 11:35:40 -0700 Subject: [PATCH] set up pypi release workflow --- .github/workflows/publish.yml | 43 +++++++++++++++++++++++++++++++++++ MANIFEST.in | 2 ++ setup.py | 4 +++- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml create mode 100644 MANIFEST.in diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b30a994 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,43 @@ +name: Publish Python 🐍 distribution 📦 to PyPI + +on: + push: + tags: + - '*' + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Install pypa/build + run: python3 -m pip install build --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: build + runs-on: ubuntu-latest + permissions: + id-token: write # Required for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..66cabd6 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include requirements.txt +include README.md \ No newline at end of file diff --git a/setup.py b/setup.py index bfc6480..0bcf193 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,10 @@ setup( name='litemultiagent', - version='0.1.0', + version='0.1.1', packages=find_packages(), + long_description=open('README.md').read(), + long_description_content_type='text/markdown', include_package_data=True, author='Danqing Zhang', author_email='danqing.zhang.personal@gmail.com',