🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
chores: create publish release github workflow and set version to v0.1.1 (#404)
Tianqi Xu7a760cfd7c96
diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.ymlnew file mode 100644index 000000000..81eefa186--- /dev/null+++ b/.github/workflows/build_package.yml@@ -0,0 +1,36 @@+name: Build Package++on:+ push:+ branches: [ "master" ]++jobs:+ build:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v3+ - name: set up python environment and install dependencies+ uses: ./.github/actions/camel_install+ with:+ python-version: "3.8"+ - name: Build+ shell: bash+ run: poetry build+ - name: Set up test environment+ run: |+ python -m venv venv+ source venv/bin/activate+ - name: Install the package+ run: |+ WHEEL_FILE=$(ls dist/*.whl)+ pip install "${WHEEL_FILE}[all,test]"+ - name: Test import+ shell: bash+ run: python -c "import camel"+ - name: Run tests with Pytest+ env:+ OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"+ GOOGLE_API_KEY: "${{ secrets.GOOGLE_API_KEY }}"+ SEARCH_ENGINE_ID: "${{ secrets.SEARCH_ENGINE_ID }}"+ OPENWEATHERMAP_API_KEY: "${{ secrets.OPENWEATHERMAP_API_KEY }}"+ run: pytest --fast-test-mode ./testdiff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.ymlindex d705e37a9..517a1715f 100644--- a/.github/workflows/documentation.yml+++ b/.github/workflows/documentation.yml@@ -1,15 +1,12 @@-name: Docs+name: Build and deploy camel documentson:push:branches: [ "master" ]- pull_request:- branches: [ "master" ]workflow_dispatch:permissions:contents: writejobs:docs:-runs-on: ubuntu-lateststeps:diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.ymlindex 80e1b69c0..ac77d8888 100644--- a/.github/workflows/pre_commit.yml+++ b/.github/workflows/pre_commit.yml@@ -1,19 +1,19 @@name: Pre Commit Checkon:- push:- branches: [ "master" ]- pull_request:- branches: [ "master" ]+ push:+ branches: [ "master" ]+ pull_request:+ branches: [ "master" ]jobs:- pre-commit:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - name: Set up Python environment and install dependencies- uses: ./.github/actions/camel_install- with:- python-version: "3.8"- - name: Run pre-commit- run: poetry run pre-commit run --all-files+ pre-commit:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v3+ - name: Set up Python environment and install dependencies+ uses: ./.github/actions/camel_install+ with:+ python-version: "3.8"+ - name: Run pre-commit+ run: poetry run pre-commit run --all-filesdiff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.ymlnew file mode 100644index 000000000..341432c83--- /dev/null+++ b/.github/workflows/publish_release.yml@@ -0,0 +1,48 @@+name: Publish camel to PyPI / GitHub++on:+ push:+ tags:+ - "v*"++ workflow_dispatch:++jobs:+ build-n-publish:+ name: Build and publish to PyPI+ runs-on: ubuntu-latest++ steps:+ - uses: actions/checkout@v3+ - name: Build and publish to pypi+ uses: JRubics/[email protected]+ with:+ pypi_token: ${{ secrets.PYPI_API_KEY }}+ ignore_dev_requirements: "yes"++ - name: Create GitHub Release+ id: create_release+ uses: actions/create-release@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token+ with:+ tag_name: ${{ github.ref }}+ release_name: ${{ github.ref }}+ draft: false+ prerelease: false++ - name: Get Asset name+ run: |+ export PKG=$(ls dist/ | grep tar)+ set -- $PKG+ echo "name=$1" >> $GITHUB_ENV+ - name: Upload Release Asset (sdist) to GitHub+ id: upload-release-asset+ uses: actions/upload-release-asset@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ upload_url: ${{ steps.create_release.outputs.upload_url }}+ asset_path: dist/${{ env.name }}+ asset_name: ${{ env.name }}+ asset_content_type: application/zipdiff --git a/.github/workflows/pytest_package.yml b/.github/workflows/pytest_package.ymlindex 2ae343a74..080002ae8 100644--- a/.github/workflows/pytest_package.yml+++ b/.github/workflows/pytest_package.yml@@ -13,7 +13,6 @@ permissions:contents: readjobs:-pytest_package_fast_test:runs-on: ubuntu-lateststeps:diff --git a/camel/__init__.py b/camel/__init__.pyindex 0f5d0e717..2c0c5c4ee 100644--- a/camel/__init__.py+++ b/camel/__init__.py@@ -22,7 +22,7 @@ import camel.functionsimport camel.memoriesimport camel.storages-__version__ = '0.1.0'+__version__ = '0.1.1'__all__ = ['__version__',diff --git a/pyproject.toml b/pyproject.tomlindex e9a4bdb51..8b1db9a87 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"[tool.poetry]name = "camel"-version = "0.1.0"+version = "0.1.1"authors = ["CAMEL-AI.org"]description = "Communicative Agents for AI Society Study"readme = "README.md"@@ -30,8 +30,6 @@ openai = "^1.2.3"tiktoken = "^0"colorama = "^0"jsonschema = "^4"-types-colorama = "^0"-types-requests = "^2"protobuf = "^4"transformers = { version = "^4", optional = true }@@ -49,8 +47,12 @@ wikipedia = { version = "^1", optional = true }pyowm = { version = "^3.3.0", optional = true }unstructured = { version = "^0.10.30", optional = true }argilla = { version = "^1.19.0", optional = true }+pytest = { version = "^7", optional = true}+mock = { version = "^5", optional = true}[tool.poetry.extras]+test = ["pytest", "mock"]+huggingface-agent = ["transformers","diffusers",@@ -72,7 +74,6 @@ tools = ["argilla",]-all = ["transformers","diffusers",@@ -112,6 +113,8 @@ types-mock = "*"types-regex = "*"types-setuptools = "*"types-tqdm = "*"+types-colorama = "^0"+types-requests = "^2"[tool.poetry.group.docs]optional = true