ci: github action for automated releasing to stage - #445
karel-rehor merged 118 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Critical workflow and secret-exposure issues, along with additional documented fixes, remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Automates tagged Maven Central releases, GitHub Pages publishing, release validation, and next-cycle preparation.
Changes:
- Replaces Nexus staging with Central Publishing.
- Adds the release workflow and validation script.
- Updates release documentation, publishing configuration, and changelog.
File summaries
| File | Summary and final findings |
|---|---|
scripts/on-release.sh |
Validates release metadata and versions. Critical: environment dumps may expose secrets. Moderate: Gradle dependency examples are not validated. |
RELEASE.md |
Documents release procedures. Nit: sample output incorrectly shows 1.12.0-SNAPSHOT. |
pom.xml |
Updates publishing and SCM configuration. |
CHANGELOG.md |
Records the release automation. Nit: superseded PR #440 link should point to #445. |
.github/workflows/maven-release.yml |
Automates validation, publishing, documentation, and next-cycle setup. Critical: URL condition exits on valid releases. Moderate: patch-release bypass behavior is undocumented or should be removed. |
Review details
Suppressed comments (3)
.github/workflows/maven-release.yml:193
- For every non-zero patch tag this guard skips preparing the next-cycle branch (and the later hot-fix guard also skips Pages publication), but RELEASE.md documents only pre-releases as exceptions and says the workflow performs both actions. Either remove the hot-fix bypass or document this patch-release behavior so operators do not expect a branch/site update that will not occur.
if [[ "${IS_HOT_FIX}" == "true" ]]
then
echo "This is a hot fix release ${RELEASE_TAG_NAME}, so next release cycle will not be prepared."
exit 0
CHANGELOG.md:5
- This changelog entry still links to superseded PR #440, while the release work was moved to PR #445 for staging. Keeping #440 here will make the published release notes point at the closed predecessor instead of this change; update the link to #445.
1. [#440](https://github.com/InfluxCommunity/influxdb3-java/pull/440): Sets up automated releasing to Maven Central
RELEASE.md:24
- The documented command uses
-DremoveSnapshot=true, but this sample output still says the project is being built as1.12.0-SNAPSHOT. That contradicts the release procedure and would lead directly to the release script rejecting the version as a snapshot; the sample should show1.12.0.
[INFO] Building InfluxDB 3 Java Client 1.12.0-SNAPSHOT
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ci/stage-automated-releasing #445 +/- ##
=============================================================
Coverage 88.73% 88.73%
=============================================================
Files 21 21
Lines 1553 1553
Branches 281 281
=============================================================
Hits 1378 1378
Misses 77 77
Partials 98 98 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The release workflow and validation script contain verified version-handling/exit-path bugs that can generate incorrect next-cycle versions and allow releases to proceed despite README mismatches.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The release workflow/script contains concrete issues that can break releases (tag checkout with shallow fetch, documentation publishing content mismatch, and on-release validation gaps).
Review details
Suppressed comments (5)
Previously missed (5) — in code that hasn't changed since the last review.
.github/workflows/maven-release.yml:24
- The workflow later runs
git checkout "${RELEASE_TAG_NAME}", butactions/checkoutdefaults to a shallow clone that may not fetch tags. This can make the tag checkout fail even for valid releases; fetch full history (or at least tags) in the checkout step.
pom.xml:643 maven-release.ymlgenerates the site withmvn ... site:stage(staging to${project.build.directory}/staging), but themaven-scm-publish-pluginno longer specifiescontent. With the current workflow command (no-Dscmpublish.content=...), this risks publishing the wrong directory (oftentarget/site) instead of the staged site.
scripts/on-release.sh:73- The accepted release tag pattern includes
snapshot, but the script later refuses to release snapshot versions (and the workflow’s tag validation also rejectssnapshot). Allowing-snapshothere makes the tag validation inconsistent and can lead to confusing failures later.
scripts/on-release.sh:228 - If the Gradle example version in README.md is out of date, the script prints an error but does not
exit 1, so the release can proceed with inconsistent documentation (unlike the Maven<version>check above, which fails fast).
scripts/on-release.sh:243 setup()is intended to validate thatxmllintis available, but it is invoked afterverify_example_pom/verify_versionalready callxmllint. As written, missingxmllintwill fail earlier withcommand not found, andsetup()never provides the intended error message.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The workflow configures git identity using a non-existent Actions variable and the release helper script’s tag parsing is fragile, either of which can break automated releases.
Review details
Suppressed comments (5)
Previously missed (3) — in code that hasn't changed since the last review.
.github/workflows/maven-release.yml:245
GITHUB_TRIGGERING_ACTORis not a default Actions environment variable, so this can resolve to an empty string and configure an invalid email ("@noreply.github.com"). UseGITHUB_ACTOR(or pass${{ github.triggering_actor }}explicitly) and keep the standard@users.noreply.github.comdomain.
RELEASE.md:11- Use the standard capitalization “GitHub” in user-facing messages/docs (this file currently uses “Github”).
This issue also appears on line 23 of the same file.
scripts/on-release.sh:31
- Use the standard capitalization “GitHub” in user-facing messages (this message currently says “Github”).
This issue also appears on line 102 of the same file.
scripts/on-release.sh:104
set_release_numberrelies onsed's empty-regexs///behavior (and mixes address +Imodifier), which is hard to read and can break on differentsedimplementations. Use an explicit substitution to strip the optional-rcN/-betaNsuffix after removing the leadingv.
set_release_number(){
RELEASE_NUM=$(echo "${RELEASE_TAG_NAME}" | sed -r "/-(rc|beta)[0-9]*/Is///" | sed -r "s/^v//")
}
RELEASE.md:25
- The example output contradicts the preceding command: after
mvn versions:set -DremoveSnapshot=true, the build version shown should no longer include-SNAPSHOT. As written, this can confuse release operators about what a correct state looks like.
[INFO] --------------------< com.influxdb:influxdb3-java >---------------------
[INFO] Building InfluxDB 3 Java Client 1.12.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The current workflow/script have release-blocking issues (incorrect CHANGELOG date parsing and Maven release deploy settings not being applied to the inner perform build), and the docs publish configuration is inconsistent with staged site output.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
pom.xml:643
- The workflow builds docs with
mvn ... site site:stage(staging output undertarget/staging), but themaven-scm-publish-pluginconfiguration no longer specifiescontent. This makes the publish step likely pick the default (commonlytarget/site) instead of the staged output, so the released docs could be incomplete/different from what was staged.
scripts/on-release.sh:123 HEADER_DATEis extracted with${HEADER_LINE[2]:1:-2}, which removes two trailing characters. For dates like[2026-08-27]this truncates the day (becoming2026-08-2) and thedate --date=...check can still succeed while validating the wrong date. Also, the sed pattern uses unescaped.so it can match non-version lines unexpectedly.
.github/workflows/maven-release.yml:245- The publish-docs step configures git with
${GITHUB_ACTOR}@noreply.github.com, but other steps use the standard${GITHUB_ACTOR}@users.noreply.github.com.@noreply.github.comis likely an invalid domain and makes commits/pushes harder to trace consistently.
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
6f7e549
into
InfluxCommunity:ci/stage-automated-releasing
Proposed Changes
Sets up automated releasing.
nexus-staging-maven-pluginwith recommendedcentral-publishing-maven-pluginmaven-release.ymlon-release.shscript which ensures values inpom.xmlfiles and documentation match the release version and tag.pom.xml1.11.0 is incremented to 1.12.0-SNAPSHOT.Note this requires up-to-date values for action secrets
Nota Bene
replaces #440 - in order to test PR related changes before merging workflows into main.
Checklist
[ ] A test has been added if appropriateN.A.