Issue
The `publish.yaml` workflows across Cycles Java repos run `mvn -B -Prelease clean deploy` on `release` events without a build-time check that the pom version is not a SNAPSHOT. Example: `cycles-spring-boot-starter/.github/workflows/publish.yaml` and the matching workflow on `cycles-spring-ai-starter`.
If someone cuts a GitHub release while the pom version is still `x.y.z-SNAPSHOT`, the workflow runs and `mvn deploy` attempts to publish. Sonatype Central rejects SNAPSHOT versions server-side, so the actual harm is "noisy publish failure" rather than "published a snapshot to Central." But a fast-fail before the deploy phase would surface the operator error more clearly.
Proposed fix
Add a step in `publish.yaml` right after JDK setup:
```yaml
- name: Verify version is not SNAPSHOT
working-directory: ${{ matrix.module-dir }}
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$VERSION" == SNAPSHOT ]]; then
echo "::error::Cannot publish SNAPSHOT version: $VERSION. Drop -SNAPSHOT before tagging."
exit 1
fi
echo "Publishing version: $VERSION"
```
Affected repos
Every Cycles repo that has a publish.yaml workflow targeting Maven Central:
- cycles-spring-boot-starter
- cycles-spring-ai-starter
- (and Python/TS equivalents if they have similar issues with PyPI / npm)
Surface
Original review finding from PR #1 on cycles-spring-ai-starter (2026-05-12). Tracking org-wide because the same pattern exists across publish workflows.
Issue
The `publish.yaml` workflows across Cycles Java repos run `mvn -B -Prelease clean deploy` on `release` events without a build-time check that the pom version is not a SNAPSHOT. Example: `cycles-spring-boot-starter/.github/workflows/publish.yaml` and the matching workflow on `cycles-spring-ai-starter`.
If someone cuts a GitHub release while the pom version is still `x.y.z-SNAPSHOT`, the workflow runs and `mvn deploy` attempts to publish. Sonatype Central rejects SNAPSHOT versions server-side, so the actual harm is "noisy publish failure" rather than "published a snapshot to Central." But a fast-fail before the deploy phase would surface the operator error more clearly.
Proposed fix
Add a step in `publish.yaml` right after JDK setup:
```yaml
working-directory: ${{ matrix.module-dir }}
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$VERSION" == SNAPSHOT ]]; then
echo "::error::Cannot publish SNAPSHOT version: $VERSION. Drop -SNAPSHOT before tagging."
exit 1
fi
echo "Publishing version: $VERSION"
```
Affected repos
Every Cycles repo that has a publish.yaml workflow targeting Maven Central:
Surface
Original review finding from PR #1 on cycles-spring-ai-starter (2026-05-12). Tracking org-wide because the same pattern exists across publish workflows.