Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions PUBLISHING_JS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Publishing Guide
# JS SDK Release

This document explains how to publish the Braintrust JavaScript SDK to npm.
## Prerelease Instructions

## Pre-Release Versions (Recommended)
- Go to [JS SDK release workflow](https://github.com/braintrustdata/braintrust-sdk-javascript/actions/workflows/publish-js-sdk.yaml)
- Click `Run Workflow`
- Pick which branch you want to pre-release and run workflow to pre-release JS SDK version
- When creating a pre-release off a non-main branch, ensure your branch is up to date with main.

The easiest way to publish is using pre-releases. This doesn't require updating `package.json` or creating git tags.
## Release Instructions

### Quick Start
- Cut a PR that bumps version number in https://github.com/braintrustdata/braintrust-sdk/blob/main/js/package.json#L3 according to [SEMVER](https://semver.org/) principles (e.g., `0.4.3` → `0.4.4`).
- Make sure the tests & integration tests PR pass.
- Merge to main in `braintrust-sdk-javascript` and `braintrust` repos.
- In the `braintrust-sdk-javascript` repo, check out the correct commit and verify you are in a sane state to release code.

Use Github Actions UI -> Publish JS SDK.
```bash
make release-js-sdk
```

## Stable Releases

For stable releases (published to `@latest`):

1. Update version in `js/package.json` (e.g., `0.4.3` → `0.4.4`)
2. Commit to `main` branch
3. Run:
```bash
make release-js-sdk
```
4. Confirm when prompted - this creates a git tag and triggers GitHub Actions
- This creates a git tag and triggers GitHub Actions
- Monitor release at https://github.com/braintrustdata/braintrust-sdk-javascript/actions/workflows/publish-js-sdk.yaml
- Update relevant docs ([internal](https://www.notion.so/braintrustdata/SDK-Release-Process-183f7858028980b8a57ac4a81d74f97c#2f1f78580289807ebf35d5e171832d2a))
- Spot check releases: https://www.npmjs.com/package/braintrust
- Run test app at https://github.com/braintrustdata/sdk-test-apps (internal) with `make verify-js`
Loading