This monorepo uses Lerna to manage and publish all packages. Publishing is done via CI when a version tag is pushed.
- Version locally → Creates a git tag
- Push to GitHub → CI automatically publishes to npm
# Interactive - prompts for version type
lerna version --no-private
# Or specify the version bump directly
lerna version patch --no-private # 3.0.1 → 3.0.2
lerna version minor --no-private # 3.0.1 → 3.1.0
lerna version major --no-private # 3.0.1 → 4.0.0Use --preid to specify the pre-release identifier. The CI will automatically publish to the matching dist-tag.
# Pre-release (publishes to `pre` dist-tag)
lerna version prerelease --preid pre --no-private # 3.0.1 → 3.0.2-pre.0
# Next release (publishes to `next` dist-tag)
lerna version prerelease --preid next --no-private # 3.0.1 → 3.0.2-next.0
# Canary release (publishes to `canary` dist-tag)
lerna version prerelease --preid canary --no-private # 3.0.1 → 3.0.2-canary.0Canary versions are published automatically on every push to the canary branch. No manual version bumping needed.
The CI workflow (.github/workflows/publish-canary.yml) will:
- Build all packages
- Generate a version like
3.1.0-canary.<short-git-sha>(e.g.,3.1.0-canary.a1b2c3d) - Publish to npm with the
canarydist-tag
Install the latest canary with:
npm install @firecms/core@canaryNote: If multiple pushes happen quickly to the same branch, earlier runs are automatically cancelled.
When you run lerna version:
- Updates all
package.jsonfiles with the new version - Creates a commit with the version bump
- Creates a git tag (e.g.,
v3.0.2orv3.0.2-pre.0) - Pushes the commit and tag to GitHub
When the tag is pushed, the CI workflow (.github/workflows/publish.yml):
- Builds all packages
- Detects the dist-tag from the version suffix
- Publishes to npm
Users can install pre-release versions using:
npm install @firecms/core@pre
npm install @firecms/core@next
npm install @firecms/core@canary