Skip to content

Configure semantic-release for path-scoped CLI releases - #10

Merged
jeremyjs merged 1 commit into
mainfrom
claude/path-scope-cli-releases
May 20, 2026
Merged

Configure semantic-release for path-scoped CLI releases#10
jeremyjs merged 1 commit into
mainfrom
claude/path-scope-cli-releases

Conversation

@jeremyjs

Copy link
Copy Markdown
Contributor

Summary

Configures semantic-release to run from packages/cli/ with monorepo support, enabling path-scoped versioning so that only commits touching CLI code trigger version bumps. Also introduces a new milestone: commit type for graduating roadmap milestones and adjusts the 0.x bump policy so feat: commits are patches (not minors) until a milestone is completed.

Key Changes

  • Monorepo support: Added semantic-release-monorepo plugin to .releaserc.json and updated release workflow to run from packages/cli/ directory, filtering commits to CLI-only changes
  • New commit type: Introduced milestone: prefix (minor bump in 0.x) for commits that complete a roadmap milestone; updated commitlint.config.cjs to allow it
  • Revised 0.x bump policy: Changed feat: from minor → patch in 0.x, so incremental feature work doesn't bump the minor; only milestone: bumps minor when a milestone is completed
  • Git tag naming: Updated to use cli-vX.Y.Z format (instead of vX.Y.Z) to distinguish CLI releases in a monorepo context
  • Changelog location: Configured changelog to generate at repo root (../../CHANGELOG.md) instead of package root
  • Release workflow improvements: Enhanced release.yml to detect version changes by comparing before/after, and explicitly set new_release_published=false when no version bump occurs

Documentation Updates

  • Updated RELEASING.md with:
    • Explanation of the conservative 0.x bump policy and rationale for feat: as patch
    • New "Path-scoped releases" section explaining how semantic-release-monorepo filters commits
    • Updated version bump table with milestone: and reordered entries to reflect new policy
    • Examples showing how different commit types map to version bumps

Implementation Details

  • semantic-release-monorepo automatically filters commits to those touching packages/cli/**, so docs-only or roadmap-only changes don't trigger CLI releases
  • The graduation guard (major stays at 0 until 1.0.0) is enforced via the { "breaking": true, "release": "minor" } rule in .releaserc.json
  • Removed pkgRoot from npm plugin config since semantic-release now runs from the correct directory

https://claude.ai/code/session_01JD2ZC6w3rWKodHFv4333Fu

… policy

Two related changes to the release automation:

1. Path-scope CLI releases. semantic-release now runs from packages/cli/
   with extends: semantic-release-monorepo, which filters analyzed commits
   to those that touched packages/cli/**. Web, docs, and roadmap changes
   no longer mint CLI versions. CHANGELOG.md still lives at the repo root
   via @semantic-release/changelog's changelogFile: ../../CHANGELOG.md.

2. Reshape the 0.x bump policy. In alpha (0.x) we want the minor to mark
   completed milestones, not every in-flight feat:. New rules:
     - milestone: -> minor (closes a roadmap milestone)
     - feat:      -> patch (intermediate progress)
     - fix/perf/refactor/security/build/revert -> patch
     - BREAKING CHANGE / ! -> minor (0.x graduation guard, unchanged)
     - docs/test/ci/chore -> no release
   Post-1.0 the standard feat -> minor mapping returns; for now milestone:
   is the only way to bump the minor.

- commitlint.config.cjs: add `milestone` to type-enum
- packages/cli/.releaserc.json: extends semantic-release-monorepo;
  updated releaseRules; release-notes-generator gets a Milestones section
- .github/workflows/release.yml: run semantic-release from packages/cli;
  capture before/after version to detect actual publish; tag format
  cli-vX.Y.Z used for the publish job's checkout ref
- RELEASING.md: document the new 0.x bump table, milestone vs feat
  distinction, and path-scoped behavior
- package.json: pin semantic-release-monorepo ^8.0.2
@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
owasp-wtf-web Ready Ready Preview, Comment May 20, 2026 6:25am

Request Review

@jeremyjs
jeremyjs merged commit d336d34 into main May 20, 2026
4 checks passed
@jeremyjs
jeremyjs deleted the claude/path-scope-cli-releases branch May 20, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants