From b8e5009e92a1ed15222392b87d83a2c55e80be08 Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 11:16:55 +0800 Subject: [PATCH 1/6] Add release job --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ pyproject.toml | 15 +++------------ 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7c2925..0be3b7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: - '**' pull_request: {} +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest @@ -60,3 +63,36 @@ jobs: - name: Run tests run: make test + + release: + if: "success() && startsWith(github.ref, 'refs/tags/')" + runs-on: ubuntu-latest + environment: release + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + + - name: check GITHUB_REF matches package version + uses: samuelcolvin/check-python-version@v4.1 + with: + version_file_path: pyproject.toml + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.8.2 + + - name: Build release distributions + run: poetry build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ diff --git a/pyproject.toml b/pyproject.toml index 37cb988..f5a4bd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,9 @@ -[project] -name = "coagent" -version = "0.0.1" -description = "" -authors = [ - { name = "Your Name", email = "you@example.com" }, -] -requires-python = ">=3.10" - [tool.poetry] -name = "coagent" +name = "coagent-python" version = "0.0.1" -description = "" +description = "An open-source framework for building monolithic or distributed agentic systems, ranging from simple LLM calls to compositional workflows and autonomous agents." authors = [ - "Your Name ", + "RussellLuo ", ] [tool.poetry.dependencies] From 7fc4d2c49b425bd0a896c423913f84a9f6bcb89a Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 11:20:02 +0800 Subject: [PATCH 2/6] fix --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f5a4bd3..f2e3bac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,12 @@ +[project] +name = "coagent-python" +version = "0.0.1" +description = "An open-source framework for building monolithic or distributed agentic systems, ranging from simple LLM calls to compositional workflows and autonomous agents." +authors = [ + { name = "RussellLuo", email = "luopeng.he@gmail.com" }, +] +requires-python = ">=3.10" + [tool.poetry] name = "coagent-python" version = "0.0.1" From 785c9bf68dc895b02df9480b4524759b7c72748e Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 11:26:41 +0800 Subject: [PATCH 3/6] fix --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f2e3bac..08e665e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,9 @@ description = "An open-source framework for building monolithic or distributed a authors = [ "RussellLuo ", ] +packages = [ + { include = "coagent" } +] [tool.poetry.dependencies] python = ">=3.10.0,<3.14" From 284f1e0189b2969b32ad477079da96b3b9fee3ba Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 14:47:36 +0800 Subject: [PATCH 4/6] update --- .github/workflows/ci.yml | 4 ++++ pyproject.toml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0be3b7b..4e05a90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,7 @@ jobs: - uses: astral-sh/setup-uv@v4 with: enable-cache: true + python-version: ${{ matrix.python-version }} - name: check GITHUB_REF matches package version uses: samuelcolvin/check-python-version@v4.1 @@ -89,6 +90,9 @@ jobs: with: version: 1.8.2 + - name: Install dependencies + run: poetry install --no-interaction --no-root + - name: Build release distributions run: poetry build diff --git a/pyproject.toml b/pyproject.toml index 08e665e..c883d6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,8 @@ authors = [ packages = [ { include = "coagent" } ] +readme = "README.md" +repository = "https://github.com/OpenCSGs/coagent" [tool.poetry.dependencies] python = ">=3.10.0,<3.14" From 606ab8666d9dcbd220d1713958e823b15b3dc63b Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 14:54:42 +0800 Subject: [PATCH 5/6] test --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e05a90..d37738c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: run: make test release: - if: "success() && startsWith(github.ref, 'refs/tags/')" + #if: "success() && startsWith(github.ref, 'refs/tags/')" runs-on: ubuntu-latest environment: release @@ -80,10 +80,10 @@ jobs: enable-cache: true python-version: ${{ matrix.python-version }} - - name: check GITHUB_REF matches package version - uses: samuelcolvin/check-python-version@v4.1 - with: - version_file_path: pyproject.toml + #- name: check GITHUB_REF matches package version + # uses: samuelcolvin/check-python-version@v4.1 + # with: + # version_file_path: pyproject.toml - name: Install Poetry uses: snok/install-poetry@v1 @@ -96,7 +96,7 @@ jobs: - name: Build release distributions run: poetry build - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: dist/ + #- name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # packages-dir: dist/ From 62e2dc5dfd8f9da19d157064f3833f4865aba5fb Mon Sep 17 00:00:00 2001 From: RussellLuo Date: Sun, 16 Feb 2025 14:57:33 +0800 Subject: [PATCH 6/6] fix --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d37738c..4e05a90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: run: make test release: - #if: "success() && startsWith(github.ref, 'refs/tags/')" + if: "success() && startsWith(github.ref, 'refs/tags/')" runs-on: ubuntu-latest environment: release @@ -80,10 +80,10 @@ jobs: enable-cache: true python-version: ${{ matrix.python-version }} - #- name: check GITHUB_REF matches package version - # uses: samuelcolvin/check-python-version@v4.1 - # with: - # version_file_path: pyproject.toml + - name: check GITHUB_REF matches package version + uses: samuelcolvin/check-python-version@v4.1 + with: + version_file_path: pyproject.toml - name: Install Poetry uses: snok/install-poetry@v1 @@ -96,7 +96,7 @@ jobs: - name: Build release distributions run: poetry build - #- name: Publish to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # packages-dir: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/