This document describes how to publish the Daytona SDKs (Python, TypeScript, and Ruby) to their respective package registries.
- Prerequisites
- Python SDK (PyPI)
- TypeScript SDK (npm)
- Ruby SDK (RubyGems)
- Automated Publishing (CI/CD)
- Version Management
Before publishing any SDK, ensure you have:
- Maintainer Access: Write access to the Daytona repository
- Package Registry Credentials:
- PyPI: Token with upload permissions
- npm: Token with publish permissions
- RubyGems: API key with push permissions
- Local Development Setup:
- All dependencies installed (
yarn install) - SDKs built successfully
- Tests passing
- All dependencies installed (
# From repository root
export PYPI_TOKEN="your-pypi-token"
export PYPI_PKG_VERSION="X.Y.Z" # pre-release format example: "X.Y.Za1"
yarn nx publish sdk-pythonNote: Guide for versioning Python packages.
# From repository root
export NPM_TOKEN="your-npm-token"
export NPM_PKG_VERSION="X.Y.Z" # pre-release format example: "X.Y.Z-alpha.1"
export NPM_TAG="latest" # or "beta", "alpha", etc.
yarn nx publish sdk-typescriptNote: NPM packages must have SemVer-aligned formats.
# From repository root
export RUBYGEMS_API_KEY="your-rubygems-api-key"
export RUBYGEMS_PKG_VERSION="X.Y.Z" # pre-release format example: "X.Y.Z.alpha.1"
yarn nx publish sdk-rubyNote: Guide for versioning Ruby gems.
The repository includes a GitHub Actions workflow for automated publishing: .github/workflows/sdk_publish.yaml
- Go to Actions → SDK and CLI Publish in the GitHub repository
- Click Run workflow
- Fill in the parameters:
- version: The version to release (e.g.,
v0.126.0) - pypi_pkg_version: (Optional) Override PyPI version
- npm_pkg_version: (Optional) Override npm version
- rubygems_pkg_version: (Optional) Override RubyGems version
- npm_tag: npm dist-tag (default:
latest)
- version: The version to release (e.g.,
Ensure these secrets are configured in GitHub repository settings:
PYPI_TOKEN: PyPI API tokenNPM_TOKEN: npm access tokenRUBYGEMS_API_KEY: RubyGems API keyGITHUBBOT_TOKEN: GitHub token for Homebrew tap updates
- Checks out the code
- Sets up all required environments (Go, Java, Python, Node.js, Ruby)
- Installs dependencies
- Configures credentials for all package registries
- Runs
yarn publishwhich uses Nx to publish all SDKs in the correct order - Updates the Homebrew tap (for the CLI)
MAJOR.MINOR.PATCH releases follow semantics:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Prerelease formats depend on SDK language:
-
For Typescript (npm) follow semantic versioning (SemVer):
MAJOR.MINOR.PATCHFor pre-releases, use:
0.126.0-alpha.1- Alpha release0.126.0-beta.1- Beta release0.126.0-rc.1- Release candidate
-
For Python (PyPI) follow Python packages versioning guide:
For pre-releases, use:
1.2.0a1- Alpha release1.2.0b1- Beta release1.2.0rc1- Release candidate
-
For Ruby (gem) follow Ruby gems versioning guide:
For pre-releases, use:
0.126.0.alpha.1- Alpha release0.126.0.beta.1- Beta release0.126.0.rc.1- Release candidate
pip index versions daytona
# or
curl -s https://pypi.org/pypi/daytona/json | jq -r .info.versionnpm view @daytonaio/sdk version
# or
npm info @daytonaio/sdkgem search daytona --remote --exact
# or
gem info daytona --remote