Getting started
Releases
How versions, changelogs, the npm package and the images come from conventional commits.
release-please reads the conventional commits on main and keeps a release pull request open for each component. Merging that pull request bumps the version, writes CHANGELOG.md, tags the commit, creates a GitHub release and publishes the component.
Components
| Component | Path | Tag | Publishes |
|---|---|---|---|
openperf | . | v0.1.0 | The six service images to GHCR and the Compose bundle to the GitHub release. |
sdk | packages/sdk | sdk-v0.1.0 | @openperf/sdk to npm. |
The two components have their own versions. openperf skips commits that only touch packages/sdk, apps/web-corpsite or .github, so a CI or workflow fix does not release the services. release-please rebuilds each release pull request on every push to main, so it never falls behind main. .release-please-manifest.json holds the last released version of each, and release-please-config.json the rules.
Never edit the versions by hand. The SDK reports the version from packages/sdk/package.json in its telemetry and in openperf --version. The release pull request of openperf also sets the image tags in compose.production.yml, on the lines marked x-release-please-version.
Versions
| Commit | Bump before 1.0.0 | Bump from 1.0.0 |
|---|---|---|
fix | patch | patch |
feat | minor | minor |
feat! or a BREAKING CHANGE: footer | minor | major |
docs, chore, refactor and test | none | none |
Pull requests are squash-merged, so the pull request title becomes the commit and the changelog entry. Write it for the people who read the changelog.
To force a version, add a Release-As: 0.2.0 footer to a commit in that component.
Changes the SDK bundles
The SDK bundles packages/shared and packages/stacktrace, but release-please assigns a commit to a component by the files it touches. A change there that alters what the SDK does must also touch packages/sdk, usually its test, or the SDK gets no release for it.
What a release runs
.github/workflows/release.yml runs release-please on every push to main. When a release pull request is merged, the same run publishes:
sdk: builds and packs the SDK, checks that the packed manifest has the release version and nocatalog:orworkspace:ranges, installs the tarball in an empty project, imports/nodeand/browserand runsopenperf --version. Then it publishes to npm, under thenexttag for a prerelease. With trusted publishing, npm adds provenance on its own once the repository is public.openperf: builds each service on nativeamd64andarm64runners withOPENPERF_VERSIONset, with provenance and an SBOM. It tags the multi-platform image as0.1.0,0.1andlatestatghcr.io/opeq-dev/openperf-<service>, then uploadsopenperf-0.1.0.tar.gzwithcompose.production.ymlandconfigto the GitHub release.
bun.lock records the version of every workspace package, and release-please does not update it. After release-please opens or updates a release pull request, the sync lockfile job runs bun install --lockfile-only on its branch and commits bun.lock, so main stays in sync after the merge.
Releases are immutable once published: GitHub rejects new assets and a moved tag. So release-please creates each release as a draft with its tag, and the workflow publishes it last: the sdk release after npm, the openperf release after the images and the bundle, marked as the latest release. A release whose publishing failed stays a draft.
If publishing the images or the bundle fails, fix the workflow on main and run release from the Actions tab with the tag, such as v0.1.0. It builds and publishes that tag again without touching npm or the changelog. Re-running the failed jobs would reuse the broken workflow of the release commit.
The release pull requests have no CI checks: GitHub does not start workflows for pull requests opened with GITHUB_TOKEN.
npm access
The publish sdk job runs in the npm environment and publishes through trusted publishing: npm trusts release.yml in this repository and needs no token. The trusted publisher on npmjs.com allows npm publish from release.yml in the npm environment. npm 11.5.1 or later exchanges the job's OIDC token for a short-lived publish token and adds provenance.
Changelog
Changelog gets an entry for every release after the first. When a release is created, release.yml calls .github/workflows/changelog.yml:
- It collects the
feat,fixandperfpull requests between the previous tag of the component and the new one, with their descriptions. Forsdk, it also counts commits inpackages/sharedandpackages/stacktrace. - Claude reads them and adds the entry at the top of
changelog.mdx. It may read the repository and edit only that file. - The job checks that only
changelog.mdxchanged, formats it and builds the site, then opens adocs(web-corpsite): changelog for …pull request.
Edit the entry in that pull request before merging; the pull request description is the source, so a clear description gives a clear entry. The job skips a release whose entry already exists and the first release of a component.
To write an entry again, delete it from changelog.mdx on main and run changelog from the Actions tab with the component and the tag. Turn off publish to print the entry in the log instead of opening a pull request.
The job needs the CLAUDE_CODE_OAUTH_TOKEN secret, from claude setup-token.