mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 07:27:57 -05:00
2.2 KiB
2.2 KiB
Releasing Sim Studio to npm
This guide outlines the steps to release Sim Studio CLI to npm and create a GitHub release with the standalone app.
Prerequisites
- Node.js 16 or higher
- npm account with access to the
simstudiopackage - GitHub access to the
simstudioai/simrepository
Release Process
1. Prepare the Release
- Ensure all changes are committed and pushed to the main branch
- Update the version number in
packages/@simstudio/cli/package.json - Update the
STANDALONE_VERSIONinpackages/@simstudio/cli/src/commands/start.tsto match
2. Run the Release Script
The release script automates most of the process:
node scripts/release-npm.js
This script will:
- Clean up any existing standalone files
- Build the standalone app
- Prepare the CLI package
- Create the standalone directory
- Provide instructions for publishing to npm and creating a GitHub release
3. Publish to npm
After the script completes, follow the instructions to publish to npm:
cd packages/@simstudio/cli
npm publish
4. Create GitHub Release
- Go to https://github.com/simstudioai/sim/releases/new
- Set the tag to match your version (e.g.,
v0.1.0) - Set the title to "Sim Studio v0.1.0" (replace with your version)
- Upload the
sim-standalone.tar.gzfile from the project root - Add release notes describing the changes
- Publish the release
Testing the Release
To test the released package:
# Install globally
npm install -g simstudio
# Run the CLI
simstudio start
# Or run with npx
npx simstudio start
Troubleshooting
npm publish fails
- Ensure you're logged in to npm:
npm login - Check that the package name is available:
npm view simstudio - Verify the version number is higher than the previously published version
GitHub release fails
- Ensure you have the correct permissions to create releases
- Check that the tag doesn't already exist
- Verify the tarball was created correctly
Maintenance
After a successful release:
- Increment the version number in
packages/@simstudio/cli/package.jsonfor the next release - Update the
STANDALONE_VERSIONinpackages/@simstudio/cli/src/commands/start.ts - Commit these changes with a message like "Bump version to X.Y.Z"