Skip to content

Commit 58cb57e

Browse files
authored
Add release job (#2)
1 parent 9a876a9 commit 58cb57e

File tree

2 files changed

+51
-6
lines changed

2 files changed

+51
-6
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- '**'
99
pull_request: {}
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
lint:
1316
runs-on: ubuntu-latest
@@ -60,3 +63,40 @@ jobs:
6063

6164
- name: Run tests
6265
run: make test
66+
67+
release:
68+
if: "success() && startsWith(github.ref, 'refs/tags/')"
69+
runs-on: ubuntu-latest
70+
environment: release
71+
72+
permissions:
73+
id-token: write
74+
75+
steps:
76+
- uses: actions/checkout@v4
77+
78+
- uses: astral-sh/setup-uv@v4
79+
with:
80+
enable-cache: true
81+
python-version: ${{ matrix.python-version }}
82+
83+
- name: check GITHUB_REF matches package version
84+
uses: samuelcolvin/[email protected]
85+
with:
86+
version_file_path: pyproject.toml
87+
88+
- name: Install Poetry
89+
uses: snok/install-poetry@v1
90+
with:
91+
version: 1.8.2
92+
93+
- name: Install dependencies
94+
run: poetry install --no-interaction --no-root
95+
96+
- name: Build release distributions
97+
run: poetry build
98+
99+
- name: Publish to PyPI
100+
uses: pypa/gh-action-pypi-publish@release/v1
101+
with:
102+
packages-dir: dist/

pyproject.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
[project]
2-
name = "coagent"
2+
name = "coagent-python"
33
version = "0.0.1"
4-
description = ""
4+
description = "An open-source framework for building monolithic or distributed agentic systems, ranging from simple LLM calls to compositional workflows and autonomous agents."
55
authors = [
6-
{ name = "Your Name", email = "you@example.com" },
6+
{ name = "RussellLuo", email = "luopeng.he@gmail.com" },
77
]
88
requires-python = ">=3.10"
99

1010
[tool.poetry]
11-
name = "coagent"
11+
name = "coagent-python"
1212
version = "0.0.1"
13-
description = ""
13+
description = "An open-source framework for building monolithic or distributed agentic systems, ranging from simple LLM calls to compositional workflows and autonomous agents."
1414
authors = [
15-
"Your Name <you@example.com>",
15+
"RussellLuo <luopeng.he@gmail.com>",
1616
]
17+
packages = [
18+
{ include = "coagent" }
19+
]
20+
readme = "README.md"
21+
repository = "https://github.com/OpenCSGs/coagent"
1722

1823
[tool.poetry.dependencies]
1924
python = ">=3.10.0,<3.14"

0 commit comments

Comments
 (0)