-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pavi
committed
Jul 21, 2024
1 parent
6f9f35e
commit b973e30
Showing
1 changed file
with
50 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,50 @@ | ||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
def get_long_description(): | ||
with open("README.md", "r", encoding="utf-8") as f: | ||
return f.read() | ||
|
||
setup( | ||
name="geminikit", | ||
version="1.0.2", | ||
author="paviththanan", | ||
author_email="[email protected]", | ||
description="The python package that returns Response of Google Gemini through Cookies.", | ||
long_description=get_long_description(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/rekcah-pavi/geminikit", | ||
packages=find_packages(exclude=[]), | ||
python_requires=">=3.6", | ||
install_requires=[ | ||
"httpx", | ||
], | ||
keywords="Python, API, Gemini, Google Gemini, Large Language Model, Chatbot API, Google API, Chatbot", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
], | ||
) | ||
name: Publish Python Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if setup.py is modified | ||
id: check_setup | ||
run: | | ||
if git diff --name-only HEAD^ HEAD | grep -q "setup.py"; then | ||
echo "setup.py changed" | ||
echo "changed=true" >> $GITHUB_ENV | ||
else | ||
echo "setup.py not changed" | ||
echo "changed=false" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' | ||
if: env.changed == 'true' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
if: env.changed == 'true' | ||
|
||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
if: env.changed == 'true' | ||
|
||
- name: Publish package | ||
env: | ||
TWINE_USERNAME: _token_ | ||
TWINE_PASSWORD: ${{ secrets.token }} | ||
run: | | ||
twine upload dist/* | ||
if: env.changed == 'true' |