Sidecar publishes npm packages from GitHub Actions using npm trusted publishing. The workflow uses npm Trusted Publishing instead of a long-lived npm token. GitHub proves the workflow identity with OIDC, and npm allows publishing only when each package trusts that exact workflow identity.
- GitHub repository:
feyninc/sidecar - Workflow file:
.github/workflows/release.yml - GitHub Environment:
npm-publish - Allowed release refs: tags matching
v* - npm authentication: Trusted Publishing / OIDC
- npm dist-tag for normal releases:
latest
The workflow builds and publishes package versions that already exist in the package manifests. It does not calculate or bump versions.
Each published package must have the same trusted publisher configured on npmjs.com:
sidecar-aicreate-sidecar-app@sidecar-ai/anthropic@sidecar-ai/auth@sidecar-ai/cli@sidecar-ai/client@sidecar-ai/compiler@sidecar-ai/core@sidecar-ai/native@sidecar-ai/openai@sidecar-ai/react@sidecar-ai/server
For each package, go to Settings -> Trusted publishing and add:
- Provider: GitHub Actions
- Organization or user:
feyninc - Repository:
sidecar - Workflow filename:
release.yml - Environment name:
npm-publish
Do not add npm tokens or release credentials to this repository. Use npm Trusted Publishing for package publication.
The publish job uses the npm-publish GitHub Environment. Configure that
environment in repository settings according to the project maintainer policy:
- Required reviewers: approved maintainers or a maintainer-owned release team
- Prevent self-review: follow the current maintainer policy
- Deployment branches and tags: selected tags matching
v*
GitHub does not expose a workflow-level "any organization member" publisher switch. Use an explicit maintainer-owned team if the reviewer list grows.
Publishing requires changing versions in the repository first. npm publishes the
versions found in package.json.
Update every package that should be released:
packages/core/package.json
packages/auth/package.json
packages/client/package.json
packages/native/package.json
packages/react/package.json
packages/server/package.json
packages/compiler/package.json
packages/cli/package.json
packages/openai/package.json
packages/anthropic/package.json
packages/sidecar-ai/package.json
packages/create-sidecar-app/package.jsonAlso update internal Sidecar dependency pins. These are dependencies from one
Sidecar package to another Sidecar package. For example, if
@sidecar-ai/compiler is bumped to 0.1.0-alpha.2 and @sidecar-ai/cli should
use it, update packages/cli/package.json:
{
"dependencies": {
"@sidecar-ai/compiler": "0.1.0-alpha.2"
}
}Common pins to check:
@sidecar-ai/clidepends on@sidecar-ai/compiler,@sidecar-ai/core,@sidecar-ai/server, and@sidecar-ai/auth@sidecar-ai/compilerdepends on@sidecar-ai/core@sidecar-ai/serverdepends on@sidecar-ai/coreand@sidecar-ai/auth@sidecar-ai/nativedepends on@sidecar-ai/client@sidecar-ai/reactdepends on@sidecar-ai/clientand@sidecar-ai/core@sidecar-ai/openaidepends on@sidecar-ai/coreand@sidecar-ai/native@sidecar-ai/anthropicdepends on@sidecar-ai/nativesidecar-aidepends on the core runtime packages users get from the base install
Also update:
sidecarVersioninpackages/create-sidecar-app/src/index.ts- example package versions and dependencies when examples should track the released version
Run these before creating a GitHub Release:
npm run typecheck
npm test
npm run build
npm pack --workspaces --dry-runTo exercise the publish script locally without uploading:
npm run release:publish -- --tag dry-run --dry-runThe script publishes packages in dependency order. In a real publish, it skips
exact package versions that already exist on npm. In dry-run mode, it still runs
npm publish --dry-run for every package so the command shape and package
contents are exercised.
- Update package versions, internal Sidecar dependency pins, scaffolder version, and examples as needed.
- Run the local checks.
- Commit and push the version changes to
main. - Create and publish a GitHub Release with a matching
v*tag, for examplev0.1.0-alpha.2. - GitHub Actions starts the
Releaseworkflow. - The workflow waits for approval on the
npm-publishenvironment. - A different approved reviewer approves the deployment.
- The workflow runs typecheck, tests, build, package verification, and npm publishing.
Use workflow dispatch when you want to verify the GitHub runner path without
publishing. Replace the ref with a temporary v* dry-run tag:
gh workflow run release.yml \
--repo feyninc/sidecar \
--ref <temporary-v-tag> \
-f dist-tag=dry-run \
-f dry-run=trueThe ref must be a v* tag because the npm-publish environment only allows
release-like tags. The dry-run workflow still requires environment approval.
Dry-run proves:
- workflow dispatch works
- the
npm-publishenvironment gate works - build, tests, and package verification work in GitHub Actions
npm publish --dry-runworks for every package
Dry-run does not fully prove npm OIDC upload acceptance because it does not upload a new package version. The only full end-to-end publish proof is a real release with new package versions.