# @braintrust/bt-publishing-test

> Braintrust test package. Used only to validate release workflows end-to-end. Not a real package; do not use.

Latest version **0.0.8** (published 2026-07-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @braintrust/bt-publishing-test
pnpm add @braintrust/bt-publishing-test
yarn add @braintrust/bt-publishing-test
bun add @braintrust/bt-publishing-test
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2026-07-17 |
| First published | 2026-06-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 724 B |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | braintrust |

## Links

- npm: https://www.npmjs.com/package/@braintrust/bt-publishing-test
- Repository: https://github.com/braintrustdata/sdk-actions
- npm.io page: https://npm.io/package/@braintrust/bt-publishing-test

## Recent versions

- 0.0.8 (latest) — 2026-07-17
- 0.0.7 — 2026-07-07
- 0.0.6 — 2026-07-07
- 0.0.5 — 2026-07-06
- 0.0.4 — 2026-07-01
- 0.0.3 — 2026-06-25
- 0.0.2 — 2026-06-18
- 0.0.1 — 2026-06-18

## README

# sdk-actions

Shared GitHub actions and workflows for Braintrust SDK repositories.

## Releases

The release actions provide building blocks for implementing release workflows in your own repository. They contain features for security (e.g. trusted publishing, gating, provenance, SBOM, etc) and convenience (e.g. Slack notifications, summaries, automated GitHub release, etc)

These actions can be used in combination to bootstrap quickly or individually to build out a customized release workflow.

### Pre-requisites

- **JS**: needs `packageManager` (or `pnpm_version`) **≥ pnpm 11.8** (for `pnpm sbom`). Bun (custom builds) needs a `bun build … --metafile` build.
- **Python**: a `uv`-buildable project; Python pinned via `.python-version` / `.tool-versions`.
- **Ruby**: needs a `rake build` that emits exactly one `pkg/*.gem`, and `rake lint`.

### Generate a release workflow

Generate one with `bin/workflow`: run it from an sdk-actions checkout and it renders a clean, ready-to-commit release workflow into your repo, then keeps it in sync with upstream.

1. **Pick a template.** *Turnkey* means we build and publish in one gated job; *custom* means you build the artifact yourself and a gated, publish-only job verifies its attestation and ships it (same trusted-publishing + provenance guarantees).

   | Template | When to use |
   |---|---|
   | `release/js/turnkey` | JavaScript, standard build — we build and publish. |
   | `release/js/custom` | JavaScript, you own the build (monorepo, bundler, custom pipeline). |
   | `release/py/turnkey` | Python, standard build — we build and publish. |
   | `release/py/custom` | Python, you own the build. |
   | `release/ruby/turnkey` | Ruby, standard build — we build and publish. |
   | `release/ruby/custom` | Ruby, you own the build. |

2. **Generate it,** writing into your repo:
   ```
   bin/workflow generate release/ruby/turnkey --gem-name braintrust --version-module Braintrust --dest ../braintrust-ruby/.github/workflows/release.yml
   ```
   Each template declares its own parameters; `bin/workflow generate <id> --help` lists them (JS exposes `--channel`/`--access`, Ruby `--version-module`, and so on). The generated workflow pins the actions to `--ref` (defaults to `origin/main`) and carries a provenance header for updates. Run `bin/workflow validate <file>` to schema-check a workflow before committing it.

3. **Follow post-generation instructions** After writing the file, `bin/workflow` prints a checklist: typically creating environments, setting up OIDC trusted publishing on your registry, and some env vars (e.g. for Slack).

### Updating a release workflow

The generated file's provenance header records the template, ref, and params, so pulling in upstream improvements is mechanical:

```
bin/workflow compare release.yml    # preview the diff against a freshly-rendered baseline
bin/workflow update  release.yml    # 3-way merge upstream changes in, keeping your edits
```

`update` re-renders the old and new baselines and applies only the delta, so your customizations survive and only genuine conflicts are flagged. It bumps the pinned sdk-actions ref as part of the merge; whether a bump is breaking is signalled by the soft-semver stamped in each `action.yml` header (a major jump means breaking changes):
```
# sdk-actions: {"family":"release","version":"1.0.0"}
#   machine-readable:  sed -n 's/^# sdk-actions: //p' action.yml | jq -r .version
```

### Manifest-driven npm tarball releases

For monorepos that own their own build and package selection, create a manifest
plus prebuilt npm tarballs and SBOMs in the source repository, attest those
artifacts before upload, then call `release/lang/js/publish-npm-tarballs` from the
gated publish job. The action verifies the downloaded tarball attestations,
then publishes the exact tarballs to npmjs in manifest order. After the source
repository pushes its package tags, call `release/create-package-github-releases`; it
attaches each package's `sbom_asset` from the manifest directory.

The manifest passed between build and publish jobs is JSON in this shape:

```json
{
  "commit": "0123456789abcdef0123456789abcdef01234567",
  "packages": [
    {
      "name": "@scope/package",
      "version": "1.2.3",
      "dir": "packages/package",
      "tag": "@scope/package@1.2.3",
      "tarball_asset": "scope-package-1.2.3.tgz",
      "sbom_asset": "scope-package-1.2.3.sbom.json",
      "release_title": "@scope/package@1.2.3",
      "release_body": "Markdown release notes",
      "channel": "latest",
      "provenance": true
    }
  ]
}
```

`name` and `version` are required. `packages` must already be in publish order.
`dir` and `commit` are source-repository metadata, useful while building and
tagging. `tarball_asset` identifies the downloaded tarball basename and is required
by `publish-npm-tarballs`. `sbom_asset` is required by
`create-package-github-releases` and is resolved relative to the manifest file's
directory. `tag` defaults to `name@version`; `release_title` defaults to `tag`; and
`release_body` defaults to a short publish message. `channel` and `provenance`
may override the `publish-npm-tarballs` defaults per package. JavaScript SBOM
generation commonly uses `pnpm sbom`, which requires pnpm `>= 11.8`.

### Available release actions

The workflow is composed from these actions — `bin/workflow generate` wires them for you, but they're listed here for reference. Each is **self-contained** (calls no other action in this repo), so a single SHA pin pulls in everything it needs.

The generated release shape is:

- **Turnkey:** `configure → validate → request-approval → build-and-ship`
- **Custom build:** `configure → validate → pack → request-approval → ship-package`

`configure` is the fact-finding step: it checks out the release SHA, resolves the package version, computes release metadata, checks the package registry, fetches release notes, and emits a `package` JSON object. `validate` consumes those facts and enforces the release gate. `request-approval` consumes one or more `package` objects through its `packages` input, so single-package and multi-package approvals use the same rendering path (including already-published / skipped packages).

| Action                                                                  | Purpose                                                                                                                                                                  |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `release/lang/<lang>/configure`                                         | Resolve release facts and package metadata: version, tag, branch, channel / `github_release`, registry availability, notes, and the package JSON object for approval      |
| `release/lang/<lang>/validate`                                          | Judge the configured facts (tag / channel / branch / notes / already-published state) and optionally run a pre-gate build + SBOM generation                              |
| `release/request-approval`                                              | Post the pre-approval job summary and Slack notification from one or more package objects                                                                                 |
| `release/lang/<lang>/build-and-ship`                                    | **Turnkey**: build → sign a CycloneDX SBOM (+ build provenance for Ruby) → publish (OIDC trusted publishing) → create the GitHub release (SBOM attached) → notify        |
| `release/lang/js/pack-pnpm` · `pack-bun`, `release/lang/{py,ruby}/pack` | **Custom build**: build + pack + sign SBOM + build provenance in an unprivileged job (no publish credentials)                                                            |
| `release/lang/<lang>/ship-package`                                      | **Custom build**: verify the attestation against the downloaded artifact → publish that exact artifact → create the GitHub release → notify                              |
| `release/build-package-manifest`                                        | Advanced helper for constructing a package object when you are not using a language `configure` action                                                                    |
| `release/lang/js/publish-npm-tarballs`                                  | Verify prebuilt npm tarballs by glob and publish the exact bytes to npmjs in manifest order                                                                              |
| `release/create-package-github-releases`                                | Create package GitHub releases from existing manifest tags, titles, and bodies, attaching each `sbom_asset` from the manifest directory                                  |
| `release/verify-package`                                                | Verify downloaded artifact attestations without using a language-specific ship action                                                                                    |

Inputs and outputs are documented in each `action.yml`. Reference an action by commit SHA:

```yaml
- uses: braintrustdata/sdk-actions/actions/release/lang/js/configure@<sha>
```

## Developing

`actions/` is **generated** from `templates/actions/`: never edit it by hand. See [CONTRIBUTING.md](CONTRIBUTING.md) for the template system and tooling.

---
_Source: https://npm.io/package/@braintrust/bt-publishing-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
