build(release): filter release commits by package path - #556
Merged
Merged
Conversation
semantic-release analyzed every commit since a package's last tag, regardless of which files it touched. The components-map fix in #554 therefore also released @swr-data-lab/components@4.0.1 when #555 triggered the components workflow. Both packages now extend semantic-release-monorepo, which limits analyzeCommits and generateNotes to commits that changed files inside the package folder. The explicit tagFormat keeps the existing components-v* / components-map-v* tags (the plugin's default would be @swr-data-lab/<pkg>-v*). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Each package runs its own semantic-release, but semantic-release analyzes every commit since the package's last tag, regardless of which files it touched. The workflow
paths:filters only decide when a release job runs, not which commits count. That's how #555 (.github/only) triggeredrelease components, which picked up #554'sfix(components-map): …and published@swr-data-lab/components@4.0.1with no changes tocomponents.Fix
Both packages now
extendsemantic-release-monorepo(8.0.2), which limitsanalyzeCommits/generateNotesto commits that changed a file inside the package folder (git diff-tree). The explicittagFormatin eachpackage.jsonoverrides the plugin's default (@swr-data-lab/<pkg>-v${version}), so existingcomponents-v*/components-map-v*tags keep working.Verification
Dry runs against a local bare clone of this repo (no GitHub/npm involved), with
components-v4.0.1removed to replay the #555 situation:componentsafter #554 + #555build:) → no releasecomponents-mapafter #555fix:incomponents/srconlycomponents→ 4.0.1, tagcomponents-v4.0.1feat:incomponents-map/srconlycomponents-map→ 1.1.0, tagcomponents-map-v1.1.0Merging this runs both release workflows (it touches both
package.jsons); both should report no release, since this is abuild:commit.Caveats
semantic-release >=22.0.7) covers 25, and the dry runs above ran on 25.0.8.package-lock.json) no longer release that package.@swr-data-lab/<pkg>-v…; nothing publishes the notes today (no GitHub release/changelog plugin).🤖 Generated with Claude Code