This repository uses GitHub Actions for continuous integration and deployment. Here's an overview of the workflows and how to use them.
Trigger: Push to main
/develop
branches, pull requests
What it does:
- Runs tests on Node.js 20 and 24
- Lints code with Biome
- Builds all packages
- Runs security audit
Status: Runs on every push and PR to ensure code quality.
Trigger: Push to main
branch with changes to any package.json
file
What it does:
- Detects which packages have version changes
- Runs full test suite
- Publishes changed packages to NPM
- Creates GitHub release with version info
Key Features:
- Only publishes packages that have version changes
- Handles dependency order (core → cli/vite-plugin)
- Creates GitHub releases automatically
Trigger: Weekly schedule (Mondays 9 AM UTC) or manual trigger
What it does:
- Updates all dependencies to latest versions
- Runs tests to ensure compatibility
- Creates PR with dependency updates
Add these secrets to your GitHub repository settings:
-
NPM_TOKEN: Your NPM authentication token
- Go to npmjs.com → Access Tokens → Generate New Token
- Choose "Automation" type
- Add to GitHub repo secrets
-
GITHUB_TOKEN: Automatically provided by GitHub
- Used for creating releases and PRs
- No setup required
-
Bump version:
# Patch version (0.2.0 → 0.2.1) pnpm version:patch # Minor version (0.2.0 → 0.3.0) pnpm version:minor # Major version (0.2.0 → 1.0.0) pnpm version:major
-
Review and commit:
git add -A git commit -m "chore: bump version to 0.2.1"
-
Push to trigger release:
git push origin main
-
Edit package.json files manually:
packages/core/package.json
packages/cli/package.json
packages/vite-plugin/package.json
- Root
package.json
-
Commit and push:
git add -A git commit -m "chore: bump version to 0.2.1" git push origin main
Answer to your question: Yes, new versions are triggered by explicit version changes in package.json files. Here's how it works:
- The release workflow monitors changes to
packages/*/package.json
- When you push a commit that changes any package version, it triggers the release
- Only packages with version changes get published
- This gives you full control over when and what gets published
- Patch (
0.2.0
→0.2.1
): Bug fixes, small improvements - Minor (
0.2.0
→0.3.0
): New features, non-breaking changes - Major (
0.2.0
→1.0.0
): Breaking changes, major rewrites
Currently all packages share the same version number, which simplifies:
- Dependency management between packages
- Release coordination
- User understanding
If you want independent versioning later, you can modify the scripts and workflows.
This project uses Node.js 24 as the latest LTS version:
- Minimum requirement: Node.js 24.0.0
- CI testing: Node.js 20 and 24
- Recommended for development: Node.js 24
- Latest stable release with enhanced performance
- Improved ES modules support
- Better TypeScript integration
- Enhanced security features
- Long-term support (LTS) when available
-
Create feature branch:
git checkout -b feature/my-feature
-
Make changes and test:
pnpm test pnpm build
-
Push and create PR:
- CI will run automatically
- Merge when approved and tests pass
-
Release when ready:
- Use version bump scripts
- Push to main
- Release happens automatically
- Check NPM_TOKEN is valid and has publish permissions
- Ensure package versions are unique (not already published)
- Check package.json
files
field includes built assets
- Run tests locally:
pnpm test
- Check Node.js version compatibility (must be >=24.0.0)
- Ensure all dependencies are properly declared
- Ensure all package.json files are valid JSON
- Check that workspace dependencies use
workspace:*
- Verify git working directory is clean before version bump
- Ensure you're using Node.js 24 or later
- Update your local Node.js installation if needed
- Check that CI is using the correct Node.js version in workflows
# Run specific package tests
pnpm --filter @sqlsmith/core test
# Build specific package
pnpm --filter @sqlsmith/cli build
# Publish specific package (if needed)
pnpm --filter @sqlsmith/core publish
# Check what would be published
pnpm --filter @sqlsmith/core pack --dry-run
# Check Node.js version
node --version