Problem
The dotCMS CLI is rebuilt and re-released on every trunk push and every dotCMS release, even when tools/dotcms-cli/** is unchanged. The native build runs an expensive 3-OS GraalVM matrix (including two macOS runners), so we burn that cost repeatedly to ship byte-identical binaries.
Proposed change
Gate the CLI build on actual CLI source changes, and reuse the prior release when unchanged.
Trunk (cicd_3-trunk.yml)
- Run
build-cli only when the cli path filter matches; gate deploy-cli on the same predicate.
Release (cicd_release-cli.yml)
- Detect whether
tools/dotcms-cli/** changed since the previous release tag (fail-safe: build when uncertain).
- When unchanged, skip the native build + JReleaser and republish the previous release's binaries under the new version across all channels — npm, the
dotcms-cli-<version> GitHub release, and Artifactory.
- Remove the Slack announcement from the CLI release cycle.
The CLI is self-contained under tools/dotcms-cli/** (its only com.dotcms dependency lives in that subtree), so the path filter is a correct change-key.
Problem
The dotCMS CLI is rebuilt and re-released on every trunk push and every dotCMS release, even when
tools/dotcms-cli/**is unchanged. The native build runs an expensive 3-OS GraalVM matrix (including two macOS runners), so we burn that cost repeatedly to ship byte-identical binaries.Proposed change
Gate the CLI build on actual CLI source changes, and reuse the prior release when unchanged.
Trunk (
cicd_3-trunk.yml)build-clionly when theclipath filter matches; gatedeploy-clion the same predicate.Release (
cicd_release-cli.yml)tools/dotcms-cli/**changed since the previous release tag (fail-safe: build when uncertain).dotcms-cli-<version>GitHub release, and Artifactory.The CLI is self-contained under
tools/dotcms-cli/**(its onlycom.dotcmsdependency lives in that subtree), so the path filter is a correct change-key.