Skip to content

Commit f74bb42

Browse files
committed
feat: add PyPI publish workflow, release docs, and project metadata (#37)
- Add .github/workflows/publish.yml with Trusted Publisher (OIDC) - Add workflow_call trigger to ci.yml for reuse as publish gate - Add RELEASE.md documenting the full release process - Add [project.urls] to pyproject.toml - Add mcp and otel optional dependency groups - Rename PyPI package to weaver-kernel (Weaver ecosystem alignment) Closes #37
1 parent 5fe6610 commit f74bb42

6 files changed

Lines changed: 139 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ["main", "copilot/**"]
66
pull_request:
77
branches: ["main"]
8+
workflow_call:
89

910
jobs:
1011
test:

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
ci:
9+
name: "CI gate"
10+
uses: ./.github/workflows/ci.yml
11+
12+
publish:
13+
name: "Build & publish"
14+
needs: ci
15+
runs-on: ubuntu-latest
16+
environment: pypi
17+
permissions:
18+
id-token: write # required for Trusted Publisher (OIDC)
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install build tools
28+
run: pip install build
29+
30+
- name: Build sdist and wheel
31+
run: python -m build
32+
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- PyPI publish workflow (`.github/workflows/publish.yml`) with Trusted Publisher (OIDC) (#37).
12+
- `RELEASE.md` documenting the full release process.
13+
- `[project.urls]` in `pyproject.toml` (Homepage, Repository, Documentation, Changelog).
14+
- Optional dependency groups: `mcp` and `otel` in `pyproject.toml`.
15+
16+
### Changed
17+
- Renamed PyPI package from `agent-kernel` to `weaver-kernel` to align with Weaver ecosystem.
18+
- Added `workflow_call` trigger to CI workflow so publish workflow can reuse it as a gate.
19+
1020
## [0.2.0] - 2026-03-06
1121

1222
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ graph LR
3838
## Quickstart
3939

4040
```bash
41-
pip install agent-kernel
41+
pip install weaver-kernel
4242
```
4343

4444
```python

RELEASE.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Release Process
2+
3+
This document describes how to publish a new version of `weaver-kernel` to PyPI.
4+
5+
## Prerequisites
6+
7+
- Push access to the `dgenio/agent-kernel` repository.
8+
- Trusted Publisher configured on PyPI for this repository
9+
(see [Trusted Publisher setup](#trusted-publisher-setup) below).
10+
11+
## Steps
12+
13+
### 1. Bump the version
14+
15+
Update the `version` field in `pyproject.toml`:
16+
17+
```toml
18+
[project]
19+
version = "0.3.0"
20+
```
21+
22+
### 2. Update the changelog
23+
24+
Add a new section to `CHANGELOG.md` under `## [Unreleased]`, then rename it
25+
to the new version with today's date:
26+
27+
```markdown
28+
## [0.3.0] - 2026-04-01
29+
30+
### Added
31+
- ...
32+
33+
### Fixed
34+
- ...
35+
```
36+
37+
### 3. Commit and tag
38+
39+
```bash
40+
git add pyproject.toml CHANGELOG.md
41+
git commit -m "release: v0.3.0"
42+
git tag v0.3.0
43+
git push origin main --tags
44+
```
45+
46+
### 4. CI takes over
47+
48+
Pushing the `v*` tag triggers `.github/workflows/publish.yml`, which:
49+
50+
1. Runs the full CI suite (`make ci` equivalent) as a gate.
51+
2. Builds the sdist and wheel with `python -m build`.
52+
3. Publishes to PyPI using Trusted Publisher (OIDC — no API tokens stored).
53+
54+
Monitor the workflow run at:
55+
<https://github.com/dgenio/agent-kernel/actions/workflows/publish.yml>
56+
57+
### 5. Verify
58+
59+
```bash
60+
pip install weaver-kernel==0.3.0
61+
```
62+
63+
## Trusted Publisher Setup
64+
65+
Trusted Publisher uses OpenID Connect (OIDC) so the GitHub Actions workflow can
66+
publish to PyPI without storing API tokens as secrets.
67+
68+
To configure it (one-time setup):
69+
70+
1. Go to <https://pypi.org/manage/project/weaver-kernel/settings/publishing/>.
71+
2. Add a new publisher:
72+
- **Owner**: `dgenio`
73+
- **Repository**: `agent-kernel`
74+
- **Workflow name**: `publish.yml`
75+
- **Environment**: `pypi`
76+
3. Save. The `publish.yml` workflow will now authenticate automatically.
77+
78+
## Version scheme
79+
80+
This project follows [Semantic Versioning](https://semver.org/):
81+
82+
- **PATCH** (0.2.x): bug fixes, documentation updates.
83+
- **MINOR** (0.x.0): new features, backward-compatible changes.
84+
- **MAJOR** (x.0.0): breaking API changes.

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "agent-kernel"
6+
name = "weaver-kernel"
77
version = "0.2.0"
88
description = "Capability-based security kernel for AI agents operating in large tool ecosystems"
99
readme = "README.md"
@@ -24,6 +24,12 @@ classifiers = [
2424
]
2525
dependencies = ["httpx>=0.27"]
2626

27+
[project.urls]
28+
Homepage = "https://github.com/dgenio/agent-kernel"
29+
Repository = "https://github.com/dgenio/agent-kernel"
30+
Documentation = "https://github.com/dgenio/agent-kernel/tree/main/docs"
31+
Changelog = "https://github.com/dgenio/agent-kernel/blob/main/CHANGELOG.md"
32+
2733
[project.optional-dependencies]
2834
dev = [
2935
"pytest>=8.0",
@@ -33,6 +39,8 @@ dev = [
3339
"mypy>=1.10",
3440
"httpx>=0.27",
3541
]
42+
mcp = ["mcp>=1.0"]
43+
otel = ["opentelemetry-api>=1.20"]
3644

3745
[tool.hatch.build.targets.wheel]
3846
packages = ["src/agent_kernel"]

0 commit comments

Comments
 (0)