|
| 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. |
0 commit comments