Skip to content

Commit f01b851

Browse files
committed
version and pypi package
1 parent e99fb06 commit f01b851

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

.github/workflows/python-package.yml

+20-4
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,30 @@ jobs:
4343
# - name: Conda list
4444
# shell: pwsh
4545
# run: conda list
46+
- name: Build autogen
47+
shell: pwsh
48+
run: |
49+
pip install twine
50+
python setup.py sdist bdist_wheel --name "autogen"
51+
- name: Build pyautogen
52+
shell: pwsh
53+
run: |
54+
pip install twine
55+
python setup.py sdist bdist_wheel --name "pyautogen"
4656
- name: Build
4757
shell: pwsh
4858
run: |
4959
pip install twine
5060
python setup.py sdist bdist_wheel
51-
- name: Publish to PyPI
61+
- name: Publish autogen to PyPI
62+
env:
63+
TWINE_USERNAME: ${{ secrets.AUTOGEN_PYPI_USERNAME }}
64+
TWINE_PASSWORD: ${{ secrets.AUTOGEN_PYPI_PASSWORD }}
65+
shell: pwsh
66+
run: twine upload dist/*autogen*
67+
- name: Publish pyautogen to PyPI
5268
env:
53-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
54-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
69+
TWINE_USERNAME: ${{ secrets.PYAUTOGEN_PYPI_USERNAME }}
70+
TWINE_PASSWORD: ${{ secrets.PYAUTOGEN_PYPI_PASSWORD }}
5571
shell: pwsh
56-
run: twine upload dist/*
72+
run: twine upload dist/*pyautogen*

autogen/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
#
55
# Portions derived from https://github.com/microsoft/autogen are under the MIT License.
66
# SPDX-License-Identifier: MIT
7-
__version__ = "0.2.35"
7+
__version__ = "0.3.0"

setup.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# SPDX-License-Identifier: MIT
77
import os
88
import platform
9+
import sys
910

1011
import setuptools
1112

@@ -101,8 +102,17 @@
101102
"bedrock": ["boto3>=1.34.149"],
102103
}
103104

105+
106+
if "--name" in sys.argv:
107+
index = sys.argv.index("--name")
108+
sys.argv.pop(index) # Removes --name
109+
package_name = sys.argv.pop(index) # Removes the value after --name
110+
else:
111+
package_name = "autogen"
112+
113+
104114
setuptools.setup(
105-
name="pyautogen",
115+
name=package_name,
106116
version=__version__,
107117
author="Chi Wang & Qingyun Wu",
108118
author_email="[email protected]",

0 commit comments

Comments
 (0)