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
* ci: github action for automated releasing to stage (#445) * ci: start maven-release.yml workflow * chore: remove branches tag on release trigger * chore: add here doc for generating release.properties * chore: fix typo * chore: update pom.xml and deploy-settings.xml for fork. * chore: add simple volume check to workflow * chore: add release command to model release step * chore: reintroduce verify step to maven0release.yml workflow * docs: start RELEASE.md * docs: document gpg2 key generation in RELEASE.md. * chore: reintroduce checks in scripts/on-release.sh * docs: update temporary notes in CHANGELOG.md * chore: fix file permissions for on-release.sh * docs: temporary change to release date - for testing workflow. * docs: temporary update toe README.md to test workflow. * chore: set correct scm version an update RELEASE.md * chore: add scm/tag value check to on-release.sh * chore: fix dropped variable in on-release.sh * chore: temporarily change scm tag to test workflow failure. * chore: revert scm tag in pom.xml after workflow test proven correct. * chore: start workflow step Prepare next cycle. * chore: get correct TAG_NAME envar in workflow script. * chore: set next release cycle branch * chore: fix broken variable string in script. * chore: temporarily add debugging checks to workflow script. * chore: add automatic update to CHANGELOG.md in workflow. * chore: use correct envar in workflow script. * chore: fix formatting of next release CHANGELOG.md header * chore: setup automated git commands for next release cycle. * chore: setup github identity in release workflow prepare next cycle. * chore: fix push to origin in workstream Prepare next cycle. * chore: fix origin repository in workflow Prepare next release cycle. * chore: setup automatic PR for new release cycle. * chore: update permissions to allow creation of PR. * chore: remove automatic PR merge command - requires permission changes at org and project level to work. * chore: add site documentation update step. Update RELEASE.md * chore: add checks and updates to examples/pom.xml * chore: temporarily change examples dependency version to verify workflow. * chore: fix typo * chore: tidy maven-release.yml * chore: add check for remote next release branch. * docs: updated and proofed RELEASE.md * chore: clarify error message. * docs: add Maven Central step to releasing instructions. * chore: remove debug messages from on-release.sh * chore: remove debug messages from maven-release.yml * chore: troubleshoot document releasing step * chore: troubleshoot site publishing issue 02 * chore: troubleshoot site publishing - set to global. * chore: revert pubScmUrl - troubleshoot site publishing step. * chore: troubleshoot sit publishing 03 * chore: modify pubScmUrl to troubleshoot site publishing * chore: troubleshoot site publishing 05 * chore: revert troubleshoot changes * chore: troubleshoot site publishing 06 * chore: troubleshoot publish site documents. * chore: fix typo * chore: troubleshoot site document releasing 07 * chore: troubleshoot site documentation 08 * chore: troubleshoot publish sit documentation 09 * chore: troubleshoot publish sit documentation 10 * chore: troubleshoot publish sit documentation 11 * chore: troubleshoot publish sit documentation 12 * chore: troubleshoot publish sit documentation 13 * chore: troubleshoot publish sit documentation 14 * chore: troubleshoot publish sit documentation 15 * chore: troubleshoot publish sit documentation 16 * chore: troubleshoot publish sit documentation 17 * chore: troubleshoot publish sit documentation 18 * chore: remove debug commands from Publish documentation step. * chore: experim - try automatic PR creation. * chore: experim - try to create new PR 02 * chore: switch off automatic PR creation, requires special permissions. * chore: reactivate branch controls for prerelease. * chore: add env checks for matching scm values. * chore: fix path in script. * chore: remove debug of script ENV. * chore: remove commented nodes from pom.xml * docs: update RELEASE.md to match current workflow. * chore: remove unnecessary commands from workflow. * chore: prepare automated releasing branch for PR to upstream. * chore: remove experimental permissions from release workflow. * docs: update CHANGELOG.md * docs: lint fixes for RELEASE.md * docs: fix linting issues in RELEASE.md * docs: fixing lint issues in RELEASE.md 02 * docs: fix typos in RELEASE.md * chore: fixing lint issues in on-release.sh * chore: fix lint issues in maven-release.yml * chore: fix linter issue in maven-release.yml * chore: revise pom version values to match upstream HEAD. * docs: anonymize commands in RELEASE.md * chore: fix typo in on-releas.sh, add reminder to check RC_OR_BETA tagged releases. * chore: fix flaws in workflow and bash scripts. * chore: use more meaningful user.email in workflow. * chore: use current shell when calling on-release.sh in workflow * chore: fix RC or BETA release tag checks. * chore: update trigger, fix snapshot credentials, verify workfow envars. * chore: remove TODO and set RC_OR_BETA envar * chore: fix typos add TODOs for fixes in on-release.sh * chore: improve checks in on-release.sh * chore: better control sequencing, better checks in workflow. * chore: fine tune release workflow and script. * chore: remove snapshot checks, revert workflow check for next working snapshot branch. * chore: fine tune behavior for patch releases. * chore: update CHANGELOG.md, fix double negative and failure message. * chore: check gradle tag version in README.md * docs: clarify behavior of pre-release, beta/rc releases and patch releases in RELEASE.md. * chore: fix typo in ENVAR name and remove trim of release number. * chore: various updates to on-release.sh * chore: correct fix for on-release.sh * chore: script and doc tweaks. * chore: fix capitalization in user facing messages. * chore: fix capitalization in messages in workflow. * docs: add reminder about Gradle in RELEASE.md * chore: replace ossrh references with maven central. * chore: prioritize pom version checks in on-release.sh * chore: add CRLF to error message. * docs: fix PR number in CHANGELOG.md * docs: fix phantom space in CHANGELOG.md * chore: workflow security fixes * chore: start scm-settings.xml * chore: protect gpg-passphrase in workflow. * chore: add license to scm-settings.xml * chore: switch repository secrets to environment secrets. * chore: remove tag filter for release event - not applicable to 'release'. * chore: revert workflow env back to secrets * chore: match envirionment in workflow to gerun releasing * build(deps): bump com.google.protobuf:protobuf-java (#447) Bumps [com.google.protobuf:protobuf-java](https://github.com/protocolbuffers/protobuf) from 4.36.1 to 4.36.2. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Commits](https://github.com/protocolbuffers/protobuf/commits) --- updated-dependencies: - dependency-name: com.google.protobuf:protobuf-java dependency-version: 4.36.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github/codeql-action from 4.38.0 to 4.38.1 (#448) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.38.0 to 4.38.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v4.38.0...v4.38.1) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.38.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: fix changes to git operations after security fixes. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.