diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7c2925..4e05a90 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,40 @@ 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 + 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: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.8.2 + + - name: Install dependencies + run: poetry install --no-interaction --no-root + + - 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..c883d6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,19 +1,24 @@ [project] -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 = [ - { name = "Your Name", email = "you@example.com" }, + { name = "RussellLuo", email = "luopeng.he@gmail.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 ", ] +packages = [ + { include = "coagent" } +] +readme = "README.md" +repository = "https://github.com/OpenCSGs/coagent" [tool.poetry.dependencies] python = ">=3.10.0,<3.14"