Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Release

# Each package is released on its own tag: `sdk-v0.1.0` publishes @submilli/sdk,
# `ai-sdk-v0.1.0` @submilli/ai-sdk, `mastra-v0.1.0` @submilli/mastra. Publishing
# uses npm trusted publishing with provenance: register this workflow and the
# `npm` environment for each package on npmjs.com first. Release @submilli/sdk
# before an integration that needs it.
# `ai-sdk-v0.1.0` @submilli/ai-sdk, `mastra-v0.1.0` @submilli/mastra, with npm
# provenance. Release @submilli/sdk before an integration that needs it.
#
# Publishing authenticates through npm trusted publishing: register this
# workflow and the `npm` environment as each package's trusted publisher on
# npmjs.com. npm only offers that for a package that already exists, so the
# first release of a package uses an `NPM_TOKEN` secret in the `npm`
# environment instead; npm tries trusted publishing first and falls back to the
# token. Delete the secret once every package has a trusted publisher.
on:
push:
tags: ["sdk-v*", "ai-sdk-v*", "mastra-v*"]
Expand Down Expand Up @@ -32,7 +37,11 @@ jobs:
test -d "packages/$dir"
test "$(node -p "require('./packages/$dir/package.json').version")" = "$version"
echo "dir=$dir" >> "$GITHUB_OUTPUT"
# Trusted publishing needs npm 11.5.1 or later.
- run: npm install -g npm@^11.5.1
- run: npm ci
- run: npm run build
- run: npm test --workspace packages/${{ steps.tag.outputs.dir }}
- run: npm publish --workspace packages/${{ steps.tag.outputs.dir }} --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,28 @@ checks that package's example against it.

## CI and releases

GitHub Actions is not enabled for this repository, so run CI locally before you push:
CI (`.github/workflows/ci.yml`) runs on every pull request and on `main`: type checks, unit
tests on Node 22 and 24, the build and publint, the integration tests against the pinned
submilli-server release, and an install of each packed package on its own.
`scripts/ci.sh` runs the same steps locally (it downloads that server release into
`.submilli-bin/` on Linux x86_64, or takes it from `$SUBMILLI_BIN`).

```sh
scripts/ci.sh
```

It does what `.github/workflows/ci.yml` would: a clean install, type checks, unit tests, the
build and publint, the integration tests against the pinned submilli-server release
(downloaded into `.submilli-bin/` on Linux x86_64, or taken from `$SUBMILLI_BIN`), and an
install of each packed package on its own. Run it on Node 22 and on Node 24.

To release a package, bump its `package.json` version and changelog, run `scripts/ci.sh`, then
publish from a clean checkout of `main`:
To release a package, bump its `package.json` version and changelog on `main`, then push a
tag that matches the version:

```sh
npm run build
npm publish --workspace packages/sdk --access public # or packages/ai-sdk, packages/mastra
git tag sdk-v0.1.0 && git push origin sdk-v0.1.0 # or ai-sdk-v0.1.0, mastra-v0.1.0
git tag sdk-v0.1.0 && git push origin sdk-v0.1.0 # or ai-sdk-v0.1.0, mastra-v0.1.0
```

Release `@submilli/sdk` before an `@submilli/ai-sdk` or `@submilli/mastra` version that depends
on it. Once Actions
is enabled, pushing the tag runs `.github/workflows/release.yml` instead, which publishes with
npm provenance through trusted publishing.
`.github/workflows/release.yml` checks that the tag matches the version, builds, tests the
package, and publishes it to npm with provenance from the `npm` environment. Release
`@submilli/sdk` before an `@submilli/ai-sdk` or `@submilli/mastra` version that depends on it.

The workflow authenticates through npm trusted publishing: each package's settings on
npmjs.com name this repository, `release.yml`, and the `npm` environment as its trusted
publisher. npm offers that only for a package that already exists, so a package's first
release uses an `NPM_TOKEN` secret in the `npm` environment instead. Remove the secret once
every package has a trusted publisher.

## License

Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project are recorded here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
[Semantic Versioning](https://semver.org/).

## [0.1.0] - Unreleased
## [0.1.0] - 2026-11-01

First release, for submilli-server 0.4.1, AI SDK 7, and `@submilli/sdk` 0.1.

Expand Down
2 changes: 1 addition & 1 deletion packages/mastra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project are recorded here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
[Semantic Versioning](https://semver.org/).

## [0.1.0] - Unreleased
## [0.1.0] - 2026-11-01

First release, for submilli-server 0.4.1, `@mastra/core` 1.79, and `@submilli/sdk` 0.1.

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project are recorded here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
[Semantic Versioning](https://semver.org/).

## [0.1.0] - Unreleased
## [0.1.0] - 2026-11-01

First release, for submilli-server 0.4.1 and later.

Expand Down
Loading