Release Guide
Section titled “Release Guide”This guide explains how to create releases and publish packages for the RCL monorepo.
Overview
Section titled “Overview”The RCL project uses a release branch workflow:
- Development happens on
mainbranch - Releases are triggered by pushing to
releasebranch - Tags are automatically synced back to
main
Release Workflow
Section titled “Release Workflow”How it Works
Section titled “How it Works”Develop on main branch using Conventional Commits:
feat:- New features (bumps minor version)fix:- Bug fixes (bumps patch version)feat!:orBREAKING CHANGE:- Breaking changes (bumps major version)docs:,chore:,test:, etc. - Non-release changes
Use the automated release commands when ready to release:
Terminal window # These commands handle everything automatically:bun run release:patch # For bug fixes (1.0.0 → 1.0.1)bun run release:minor # For new features (1.0.0 → 1.1.0)bun run release:major # For breaking changes (1.0.0 → 2.0.0)The release command automatically:
- Ensures you're on main branch
- Pulls latest changes
- Bumps version in all packages
- Creates release commit
- Pushes to release branch
- Triggers GitHub Actions workflow
GitHub Actions then automatically:
- Builds and tests all packages
- Creates version tag
- Publishes to NPM
- Publishes VSCode extension
- Creates GitHub release with changelog
- Syncs tag back to main branch
Example Workflow
Section titled “Example Workflow”# Develop features on maingit checkout maingit add .git commit -m "feat(compiler): add support for async actions"git push origin main
# When ready to release (one command!)bun run release:minor
# Monitor the release progressgh run list --limit 3
# After release completes, pull the synced taggit pull origin main --tagsQuick Release Commands
Section titled “Quick Release Commands”# Patch release (1.0.0 → 1.0.1)bun run release:patch
# Minor release (1.0.0 → 1.1.0)bun run release:minor
# Major release (1.0.0 → 2.0.0)bun run release:major
# Dry run (see what would happen)bun run release:dryCommit Message Examples
Section titled “Commit Message Examples”# Feature (minor version bump)feat(parser): add support for nested flowsfeat(cli): add --watch flag for development
# Bug fix (patch version bump)fix(compiler): resolve state transition validationfix(extension): fix syntax highlighting for strings
# Breaking change (major version bump)feat(ast)!: change AST node structure for flowsfix(compiler)!: require explicit state declarations
# Multiple packagesfeat: update parser and compiler for new syntaxAlternative: Manual Releases
Section titled “Alternative: Manual Releases”The manual workflow is available for special cases:
- Emergency patches
- Pre-releases/beta versions
- Testing release process
- Go to GitHub Actions → "Manual Release & Publish"
- Click "Run workflow"
- Select:
- Release type: patch, minor, or major
- Prerelease: true for beta releases
- Packages: "all" or comma-separated list
- Click "Run workflow"
Release Triggers Summary
Section titled “Release Triggers Summary”Primary: Release Branch
Section titled “Primary: Release Branch”- Trigger: Push to
releasebranch - When: Ready to release new version
- Process: Automatic build → test → publish → tag
Secondary: Manual Dispatch
Section titled “Secondary: Manual Dispatch”- Trigger: Manual workflow dispatch
- When: Emergency releases or testing
- Process: Direct release with options
Package Publishing
Section titled “Package Publishing”NPM Packages
Section titled “NPM Packages”The following packages are published to NPM:
| Package | Path | Public |
|---|---|---|
| @rcs-lang/ast | packages/ast | ✅ |
| @rcs-lang/compiler | packages/compiler | ✅ |
| @rcs-lang/csm | packages/csm | ✅ |
| @rcs-lang/language-service | packages/language-service | ✅ |
| @rcs-lang/cli | packages/cli | ✅ |
| @rcs-lang/core | packages/core | ✅ |
| @rcs-lang/file-system | packages/file-system | ✅ |
| @rcs-lang/validation | packages/validation | ✅ |
| @rcs-lang/parser | packages/parser | ❌ (private) |
Direct Publishing is Disabled
Section titled “Direct Publishing is Disabled”Important: The publish:packages script has been disabled to enforce the proper release workflow. Always use the release commands:
bun run release:patchbun run release:minorbun run release:major
Attempting to use publish:packages will show an error directing you to use the proper release flow.
VSCode Extension
Section titled “VSCode Extension”- Name: rcl-language-support
- Path: apps/extension
- Marketplace: Visual Studio Code Marketplace
- Publishing: Automatic when extension changes
Version Management
Section titled “Version Management”Synchronized Versioning
Section titled “Synchronized Versioning”All packages share the same version number for simplicity and consistency.
Version Bump Rules
Section titled “Version Bump Rules”- patch (1.0.0 → 1.0.1): Bug fixes
- minor (1.0.0 → 1.1.0): New features
- major (1.0.0 → 2.0.0): Breaking changes
Pre-releases
Section titled “Pre-releases”- Format:
1.1.0-beta.0 - Published with
betatag on NPM - Not published to VSCode marketplace
Required Secrets
Section titled “Required Secrets”Configure these in GitHub repository settings:
| Secret | Description | Required For |
|---|---|---|
NPM_TOKEN | NPM automation token | Publishing packages |
VSCODE_PUBLISH_TOKEN | VSCode marketplace Personal Access Token | Publishing extension |
GITHUB_TOKEN | Automatically provided | Creating releases |
Troubleshooting
Section titled “Troubleshooting”Release Please not creating PR
Section titled “Release Please not creating PR”- Ensure commits follow conventional format
- Check if there are releasable changes
- Verify Release Please app has permissions
Package publish fails
Section titled “Package publish fails”- Check NPM_TOKEN is valid
- Verify package.json is not private
- Ensure version doesn't already exist
VSCode extension publish fails
Section titled “VSCode extension publish fails”- Verify VSCODE_PUBLISH_TOKEN is valid
- Check extension manifest version
- Ensure all required files are built
Best Practices
Section titled “Best Practices”- Use conventional commits for automatic versioning
- Group related changes in single PRs
- Review Release PRs before merging
- Test locally before releasing
- Document breaking changes clearly
- Use pre-releases for testing major changes
Rollback Procedure
Section titled “Rollback Procedure”If a release has issues:
- Revert the release commit on main
- Deprecate bad NPM versions:
npm deprecate @rcs-lang/package@version "Contains critical bug" - Create fix and release patch version
- Update release notes with known issues
Q: How often should we release?
Section titled “Q: How often should we release?”A: Release when you have meaningful changes. Weekly or bi-weekly is common for active projects.
Q: Can I release a single package?
Section titled “Q: Can I release a single package?”A: Yes, use the manual workflow with specific package names.
Q: How to do a hotfix?
Section titled “Q: How to do a hotfix?”A: Use manual workflow with "patch" type for fastest release.
Q: What about security releases?
Section titled “Q: What about security releases?”A: Use manual workflow immediately, document in SECURITY.md.