Skip to content

ci(release): work out each module's version and notes from its own commits - #92

Merged
Arc-E-Tect merged 1 commit into
mainfrom
fix/release-per-component-commits
Sep 18, 2026
Merged

Arc-E-Tect merged 1 commit into
mainfrom
fix/release-per-component-commits

Conversation

@Arc-E-Tect

Copy link
Copy Markdown
Owner

Each module's version and release notes now come from its own commits. This is the same fix as API #29 (merged and proven on real releases), Gradle #284 and the Code repository's #255, fitted to this repository's layout.

The problem

semantic-release reads every commit since a module's last tag, whichever module the commit changed. So one module's feat raised another module's version and showed up in its changelog.

The fix

  • release/component-commits.js keeps the commits that change something inside the module's own directory, using git diff-tree, with no dependencies. It lives in a new shared release/ directory, as in the other repositories.
  • api-detector-core, api-only-transcriberj-restdocs and dsl-updater-core keep their own first-release-patch-analyzer.js. Each copy now passes only the module's own commits to the analyzer: two lines, the same in all three.
  • geo-tracker-lens-pack, hexagonal-spring-rules and sedr-library called @semantic-release/commit-analyzer directly. They now name release/component-commit-analyzer.js, with the same options.
  • release/component-release-notes.js hands the same commits to the release-notes generator, for every module that has one.
  • release/component-commits.test.js (node:test, against a real throwaway git repository). semantic-version-calculate.yml runs it first, so a broken filter can never choose a version.

Verified

semantic-release dry-runs in all six module directories, on this branch, against the real tags:

Module Commits since its last tag Its own Next release
api-detector-core 14 2 none
api-only-transcriberj-restdocs 5 3 none
dsl-updater-core 17 2 none
geo-tracker-lens-pack 72 2 none
hexagonal-spring-rules 52 2 none
sedr-library 49 3 1.0.1

sedr-library's 1.0.1 is owed and legitimate: #76 (fix(ci)) changed something in sedr-library/ and was never released. The tests pass (4/4), and actionlint is clean.

What merging does

Nothing is released. The release workflows here trigger only on src/, gradle/ and *.gradle changes, and this PR changes none of those. sedr-library's owed 1.0.1 ships with its next real change.

…mmits

semantic-release reads every commit since a module's last tag, whichever
module the commit changed, so one module's feat raised another's version
and appeared in its changelog.

release/component-commits.js keeps the commits that change something
inside the module's own directory. Each module's own first-release
analyzer, or release/component-commit-analyzer.js for the modules that
used the plain analyzer, works out the version from those, and
release/component-release-notes.js hands the same commits to the
release-notes generator. node:test covers the filter against a real git
repository, and the shared version calculation runs those tests first.
The same design as the API, Code and Gradle repositories.
@Arc-E-Tect
Arc-E-Tect merged commit 08b33d1 into main Sep 18, 2026
24 checks passed
@Arc-E-Tect
Arc-E-Tect deleted the fix/release-per-component-commits branch September 18, 2026 17:49
Arc-E-Tect added a commit that referenced this pull request Sep 18, 2026
…itory does (#93)

Every release workflow here failed when it was started but no version was
calculated. Now that a module's version counts only its own commits, that
happens whenever a change that releases nothing starts one - #92 itself
failed the Spring Rules and Geo Tracker Lens Pack releases this way.

The version calculation now reports next_version_empty, as Gradle's does,
and every release workflow runs its release, publish, README and
release-type jobs only when a version was calculated, with
fail_on_empty_version off. next_version could not serve: it falls back to
the current version when none is calculated. The existing-tag check stays
on, and applies only to a calculated version, since the fallback's tag
exists by definition.
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant