Skip to content

Commit 2ca56df

Browse files
authored
Merge pull request #4 from mindsdb/feat/add-pypi-release-deploy
feat: add pypi release
2 parents 1ac0f93 + 7e236a5 commit 2ca56df

File tree

4 files changed

+50
-13
lines changed

4 files changed

+50
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release on PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
# Push a new release to PyPI
9+
deploy_to_pypi:
10+
name: Publish to PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5.1.0
16+
with:
17+
python-version: ${{ vars.CI_PYTHON_VERSION }}
18+
- name: Install dependencies
19+
run: |
20+
pip install setuptools wheel twine
21+
- name: Clean previous builds
22+
run: rm -rf dist/ build/ *.egg-info
23+
- name: Build and publish
24+
env:
25+
TWINE_USERNAME: __token__
26+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27+
run: |
28+
# This uses the version string from __about__.py, which we checked matches the git tag above
29+
python setup.py sdist
30+
twine upload dist/* --verbose

flat_ai/__about__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__title__ = 'flat-ai'
2+
__package_name__ = 'flat_ai'
3+
__version__ = '0.1.0'
4+
__description__ = 'F.L.A.T. (Frameworkless LLM Agent Thing) for building AI Agents'
5+
__email__ = 'hello@mindsdb.com'
6+
__author__ = 'Yours truly Jorge Torres and an LLM'
7+
__github__ = 'https://github.com/mindsdb/flat-ai'
8+
__pypi__ = 'https://pypi.org/project/flat-ai/'
9+
__copyright__ = 'Copyright 2025-MindsDB'

flat_ai/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
from .flat_ai import FlatAI
2-
3-
__version__ = "0.1.0"
4-
__all__ = ["FlatAI"]

setup.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
from setuptools import setup, find_packages
22

3+
about = {}
4+
with open("flat_ai/__about__.py") as fp:
5+
exec(fp.read(), about)
6+
37
with open("README.md", "r", encoding="utf-8") as fh:
48
long_description = fh.read()
59

610
setup(
7-
name="flat-ai",
8-
version="0.1.0",
9-
author="Yours truly Jorge Torres and an LLM",
10-
author_email="your.email@example.com",
11-
description="F.L.A.T. (Frameworkless LLM Agent Thing) for building AI Agents",
11+
name=about['__title__'],
12+
version=about['__version__'],
13+
author=about['__author__'],
14+
author_email=about['__email__'],
15+
description=about['__description__'],
1216
long_description=long_description,
1317
long_description_content_type="text/markdown",
1418
url="https://github.com/yourusername/flat-ai",
1519
packages=find_packages(),
1620
classifiers=[
1721
"Development Status :: 3 - Alpha",
18-
"Intended Audience :: Developers Who Are Too Cool for Frameworks",
19-
"Intended Audience :: People Who Think AI Should Have More Personality",
20-
"Intended Audience :: Anyone Who's Ever Said 'I Could Build That Better'",
21-
"Intended Audience :: Coffee-Powered Code Ninjas",
22+
"Intended Audience :: Developers",
2223
"License :: OSI Approved :: MIT License",
2324
"Operating System :: OS Independent",
2425
"Programming Language :: Python :: 3",
@@ -32,4 +33,4 @@
3233
"openai>=1.0.0",
3334
"pydantic>=2.0.0",
3435
],
35-
)
36+
)

0 commit comments

Comments
 (0)