Skip to content

Commit e2e3654

Browse files
committed
Add npm publish workflow
1 parent b49a6db commit e2e3654

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Package version to publish, for example 0.1.0"
8+
required: true
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 22
22+
registry-url: https://registry.npmjs.org
23+
cache: npm
24+
- run: npm ci
25+
- run: npm run typecheck
26+
- run: npm test
27+
- run: npm run build
28+
- run: npm version "${{ inputs.version }}" --no-git-tag-version
29+
- run: npm publish --provenance --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ This package is the compatibility anchor for all AgentDispatch repositories. Clo
1212
- Adapters: provider-specific implementations behind a stable `BackendAdapter` contract.
1313
- Policies: provider-neutral authorization rules for account profiles, capabilities, task types, and target modes.
1414
- Testing: `assertBackendAdapterContract` gives adapter repos a reusable conformance check.
15+
16+
## Publishing
17+
18+
See `docs/release.md` for the npm publishing workflow and the dependency-order checklist for the separate `agent-dispatch` repositories.

docs/release.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Release Workflow
2+
3+
`@agentdispatch/core` is the compatibility anchor for all AgentDispatch packages. Publish it before replacing bootstrap `file:../agentdispatch-core` links in dependent repositories.
4+
5+
## Prerequisites
6+
7+
- Create the `@agentdispatch` npm organization or scope.
8+
- Add an npm automation token as `NPM_TOKEN` in `agent-dispatch/core` repository secrets.
9+
- Confirm the package name `@agentdispatch/core` is available.
10+
11+
## Publish Core
12+
13+
Use the `Publish` GitHub Actions workflow with the target version, for example `0.1.0`.
14+
15+
The workflow runs:
16+
17+
```bash
18+
npm ci
19+
npm run typecheck
20+
npm test
21+
npm run build
22+
npm publish --provenance --access public
23+
```
24+
25+
## Update Dependents
26+
27+
After the core package is published:
28+
29+
1. Replace `file:../agentdispatch-core` dev dependencies with `^0.1.0`.
30+
2. Keep `@agentdispatch/core` as a peer dependency in adapters, stores, MCP, SDK, and CLI packages.
31+
3. Remove CI bootstrap skips that detect `file:../` dependencies.
32+
4. Publish dependent packages in dependency order:
33+
- `@agentdispatch/store-sqlite`
34+
- `@agentdispatch/adapter-aws-agentcore`
35+
- `@agentdispatch/sdk`
36+
- `@agentdispatch/mcp-server`
37+
- `@agentdispatch/cli`
38+
- `@agentdispatch/worker-agentcore`

0 commit comments

Comments
 (0)