Skip to content

release ​

Execute the complete release workflow in a single command.

Usage ​

bash
relizy release [options]

What It Does ​

The release command combines multiple operations:

  1. ✅ Bumps version in package.json
  2. ✅ Generates/updates CHANGELOG.md
  3. ✅ Creates a git commit
  4. ✅ Creates a git tag
  5. ✅ Publishes to npm
  6. ✅ Creates GitHub or GitLab release
  7. ✅ Posts to social media (optional)
  8. ✅ Posts a comment on the PR/MR (optional)

Branch Safety ​

Packages are published before the release commit and tags are pushed, so a failed publish never leaves a tag behind. In return, Relizy makes sure the release commit can actually be pushed:

  • Remote sync check: when push and commit are enabled, Relizy fetches the upstream branch during the safety checks and again right before publishing. If new commits were pushed to the branch while the release was running (e.g. during a long CI build), the release stops before publishing and restores the release files. Re-run it from the latest commit. The check is skipped on a detached HEAD or when the branch has no upstream.
  • Existing tag check: right after the bump, Relizy fails if a tag it is about to create already exists. This catches a re-run after a release that published its packages but never got its release commit onto the branch, and prints how to recover (git fetch --tags && git merge <tag> && git push).
  • Rejected push recovery: if the push is still rejected because the remote branch moved in the meantime (non-fast-forward), Relizy merges the remote branch into the release commit and pushes again. A merge (not a rebase) keeps the tags on the exact commit that was published, and the concurrent commits show up in the next changelog. If the merge conflicts, Relizy aborts it, pushes the tags so the release commit is preserved, and prints the recovery command.

Options ​

Release Type ​

Specify the version bump type:

bash
# Patch release (1.0.0 → 1.0.1)
relizy release --patch

# Minor release (1.0.0 → 1.1.0)
relizy release --minor

# Major release (1.0.0 → 2.0.0)
relizy release --major

All available version flags: --patch, --minor, --major, --prerelease, --prepatch, --preminor, --premajor

If no type is specified, Relizy automatically detects it from commits.

--canary ​

Publish a temporary test version without git side effects:

bash
relizy release --canary

When --canary is used, Relizy automatically disables: changelog generation, git commit, git tag, git push, provider release (GitHub/GitLab), and social media posting. Only publishing to npm and PR comments remain active.

The canary version format is {nextVersion}-0.canary-{sha} (e.g., 1.3.0-0.canary-a3f4b2c).

Use --preid to customize the prerelease identifier:

bash
relizy release --canary --preid snapshot
# → 1.3.0-0.snapshot-a3f4b2c

See the Canary Releases guide for full details.

--no-commit ​

Skip creating git commit:

bash
relizy release --no-commit

--no-push ​

Skip pushing to remote:

bash
relizy release --no-push

--dry-run ​

Preview changes without executing:

bash
relizy release --dry-run

--yes ​

Skip all confirmations:

bash
relizy release --yes

--no-git-tag ​

Skip pushing git tag:

bash
relizy release --no-git-tag

--no-social ​

Skip social media posting:

bash
relizy release --no-social

--no-pr-comment ​

Skip PR/MR comment posting:

bash
relizy release --no-pr-comment

--pr-number ​

Override the auto-detected PR/MR number:

bash
relizy release --patch --pr-number 42

Useful in CI/CD where the PR number is available as an environment variable:

bash
relizy release --patch --yes --pr-number ${{ github.event.pull_request.number }}

--ai / --no-ai ​

Force-enable or force-disable AI enhancement for release notes and social media:

bash
# Force AI for this release
relizy release --patch --ai

# Disable AI for this release
relizy release --patch --no-ai

These flags override the ai.providerRelease and ai.social settings in your config file. See the AI-Enhanced Changelogs guide for setup.

--no-provider-release ​

Skip provider release creation (GitHub/GitLab):

bash
relizy release --no-provider-release

--no-publish ​

Skip npm publishing:

bash
relizy release --no-publish

--skip-existing-versions ​

Skip packages whose version already exists on the registry instead of failing:

bash
relizy release --skip-existing-versions

Makes a re-run idempotent: already-published versions are skipped with a warning, and only missing packages are published. Particularly useful for canary releases, where re-running a pipeline on the same commit regenerates the same version. Without this flag, an already-published version fails the release with a clear error message. See publish.skipExistingVersions for details.

--include-private ​

Include private packages (packages with "private": true in their package.json) in the release. By default, private packages are skipped entirely.

bash
relizy release --minor --include-private

When enabled:

  • Private packages are bumped alongside public ones.
  • Private packages get their own CHANGELOG.md.
  • Their commits are included in the aggregated root changelog.
  • In independent mode, they get their own git tag and GitHub/GitLab release.
  • They are listed in the PR comment, without install commands.

Private packages are never published to a registry, even with this flag. See Private Projects & Apps to version a project that publishes nothing.

This is equivalent to setting monorepo.includePrivates: true in relizy.config.ts. See Monorepo Configuration — includePrivates.

Examples ​

Basic Release ​

bash
# Interactive release
relizy release --patch

# Output:
# → Bumping version to 1.0.1
# → Generating changelog
# → Creating commit
# → Creating tag v1.0.1
# → Pushing to remote
# ✓ Release complete!

Complete Release with Publishing ​

bash
relizy release --minor

# This will:
# 1. Bump to 1.1.0
# 2. Update changelog
# 3. Commit and tag
# 4. Publish to npm
# 5. Create GitHub release

Monorepo Selective Release ​

bash
relizy release --selective --minor

# Only packages with changes are bumped

CI/CD Usage ​

bash
# Automated release in CI
relizy release --patch --yes --no-clean

Canary Release ​

bash
# Publish a canary version
relizy release --canary

# Canary with custom preid in CI
relizy release --canary --preid snapshot --yes

# Canary with PR comment
relizy release --canary --yes --pr-number 42

See Also ​

Released under the MIT License.