|
| 1 | +# Releasing PoseCode packages |
| 2 | + |
| 3 | +PoseCode publishes five npm packages as one fixed-version release: |
| 4 | + |
| 5 | +- `posecode-parser` |
| 6 | +- `posecode-render` |
| 7 | +- `posecode-share` |
| 8 | +- `posecode-embed` |
| 9 | +- `posecode-mcp` |
| 10 | + |
| 11 | +The release workflow also publishes `packages/posecode-mcp/server.json` to the |
| 12 | +official MCP Registry after npm publication succeeds. |
| 13 | + |
| 14 | +## One-time repository setup |
| 15 | + |
| 16 | +For each npm package above, configure an npm trusted publisher with: |
| 17 | + |
| 18 | +- Provider: GitHub Actions |
| 19 | +- Organization: `posecode-dev` |
| 20 | +- Repository: `posecode` |
| 21 | +- Workflow filename: `release.yml` |
| 22 | +- Allowed action: npm publish |
| 23 | + |
| 24 | +The workflow uses GitHub OIDC, so no long-lived npm token is required. In the |
| 25 | +GitHub repository Actions settings, allow GitHub Actions to create pull |
| 26 | +requests. The workflow also needs the permissions declared in |
| 27 | +`.github/workflows/release.yml`. |
| 28 | + |
| 29 | +## Normal release flow |
| 30 | + |
| 31 | +1. Run `npm run changeset` in each pull request that changes a public package. |
| 32 | +2. Merge the pull request into `main`. |
| 33 | +3. Review and merge the automatically maintained `chore: release packages` |
| 34 | + pull request. |
| 35 | +4. The next release workflow publishes the npm packages, creates GitHub |
| 36 | + releases, and updates the official MCP Registry through GitHub OIDC. |
| 37 | + |
| 38 | +The first run can be started from the Actions tab with **Release packages → Run |
| 39 | +workflow** after trusted publishing is configured. If changesets are waiting, |
| 40 | +merge the generated release pull request; the following run publishes every |
| 41 | +local package version that is newer than npm. |
| 42 | + |
| 43 | +## Local verification |
| 44 | + |
| 45 | +```bash |
| 46 | +npm ci |
| 47 | +npm run typecheck |
| 48 | +npm run build:packages |
| 49 | +npm run check:packages |
| 50 | +npm test |
| 51 | +``` |
| 52 | + |
| 53 | +`npm run check:packages` fails if public package versions drift, built entry |
| 54 | +points are missing from a tarball, internal dependency versions disagree, or |
| 55 | +the MCP Registry manifest does not match `posecode-mcp`. |
0 commit comments