|
| 1 | +# AgentOS Extensions Release Workflow |
| 2 | + |
| 3 | +This package publishes to npm via [semantic-release](https://semantic-release.gitbook.io) and GitHub Actions. |
| 4 | + |
| 5 | +## Branch flow |
| 6 | + |
| 7 | +- `master` is the canonical release branch. |
| 8 | +- Each merge to `master` triggers `.github/workflows/release.yml`. |
| 9 | +- Commits must follow the [Conventional Commits](https://conventionalcommits.org) syntax so semantic-release can derive the correct version bump. |
| 10 | +- If there are no `feat`/`fix` (or breaking) commits since the previous release, the workflow exits without publishing. |
| 11 | + |
| 12 | +## What the workflow does |
| 13 | + |
| 14 | +1. Installs dependencies (`pnpm install`). |
| 15 | +2. Runs `pnpm run build` to ensure all curated registries compile. |
| 16 | +3. Executes `semantic-release`, which: |
| 17 | + - Calculates the next version. |
| 18 | + - Updates `CHANGELOG.md`. |
| 19 | + - Publishes a tag/release in GitHub (`vX.Y.Z`). |
| 20 | + - Publishes the package to npm. |
| 21 | + - Commits the updated changelog & package.json back to `master` as `chore(release): X.Y.Z [skip ci]`. |
| 22 | + |
| 23 | +## Commit → Version mapping |
| 24 | + |
| 25 | +| Commit message | Release | |
| 26 | +|-----------------------------------|--------------------------| |
| 27 | +| `fix:` | Patch (x.y.z → x.y.z+1) | |
| 28 | +| `feat:` | Minor (x.y.z → x.y+1.0) | |
| 29 | +| `feat!:`, `fix!:` or `BREAKING CHANGE:` | Major (x.y.z → x+1.0.0) | |
| 30 | +| `docs:`, `chore:` (no breaking) | No release | |
| 31 | + |
| 32 | +## Manual invocation |
| 33 | + |
| 34 | +If you need to re-run locally: |
| 35 | + |
| 36 | +```bash |
| 37 | +pnpm install |
| 38 | +pnpm run build |
| 39 | +npx semantic-release --dry-run # inspect |
| 40 | +npx semantic-release # publish |
| 41 | +``` |
| 42 | + |
| 43 | +Run manual releases only from a clean checkout of `master` with the correct `NPM_TOKEN` configured. |
| 44 | + |
| 45 | +## Secrets |
| 46 | + |
| 47 | +- `GITHUB_TOKEN` is provided automatically by GitHub Actions. |
| 48 | +- `NPM_TOKEN` must be stored as a repository secret in the submodule (`Settings → Secrets and variables → Actions`). |
| 49 | + |
0 commit comments