ci(release): Tag-triggered Maven Central release workflow#3
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughAdds a ChangesMaven Central Release Workflow and Docs
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Git as GitHub (v* tag push)
participant GHA as release.yml
participant Approver as release environment approver
participant Central as Maven Central
Dev->>Git: mvn release:prepare (pushes commits + v* tag)
Git->>GHA: triggers release.yml
GHA->>Approver: waits for deployment approval
Approver->>GHA: approves release environment
GHA->>GHA: JDK/GPG setup (secrets injected)
GHA->>Central: mvn deploy -Prelease -DskipTests (GPG-signed, sources + javadoc)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 24-32: The release workflow needs security hardening on external
actions. Update the actions/checkout action on line 24 to replace the floating
version tag (v7) with a full commit SHA and add persist-credentials: false to
disable credential persistence. Additionally, locate the jdk-setup composite
action file at ./.github/actions/jdk-setup/action.yml and update all instances
of floating actions/setup-java@v5 tags (mentioned at lines 29 and 37) to use
pinned full commit SHAs instead. This ensures the release pipeline only uses
specific, immutable versions of external actions to prevent supply chain
attacks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: af6502d9-0018-4931-a272-8453e44db384
📒 Files selected for processing (2)
.github/workflows/release.ymlsrc/site/asciidoc/releasing.adoc
9d4df83 to
22b0589
Compare
Commit release.yml so a pushed v* tag (created by release:prepare) deploys -Prelease to Maven Central. Switch from raw setup-java to the jdk-setup composite (matching the other workflows) and bump checkout to v7. Rewrite releasing page for the updated CI release flow: release:prepare auto-pushes the tag (pushChanges defaults to true), release.yml waits on the release environment approval gate, then deploys. Add the one-time prerequisites and correct the obsolete push step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013DKrZ3wSe6H5HXPzg8iWC6
deploy-snapshot also handles Maven Central credentials and never pushes back to git, so drop the persisted GITHUB_TOKEN. Same hardening as the release workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013DKrZ3wSe6H5HXPzg8iWC6
22b0589 to
90c0719
Compare
Commits and standardizes
release.ymlso releases publish from CI instead of a localrelease:perform.Flow
mvn release:prepare(local) bumps versions, tagsv<version>, and auto-pushes (pushChangesdefault). The tag triggersrelease.yml, which waits for approval on thereleaseenvironment, then runsdeploy -Prelease(GPG-signed, sources + javadoc, auto-published to Central).Changes
release.yml— committed (was untracked); switched from rawsetup-javato thejdk-setupcomposite and bumpedcheckout@v7, to match the other workflows. (permissions/concurrency/environment: releasewere already present.)releasing.adoc— rewritten for the real (auto-push + gate) flow; adds one-time prerequisites; the oldgit push --tagsstep (which would have skipped the branch commits) is gone.Prerequisites before first use
CENTRAL_USERNAME,CENTRAL_TOKEN,GPG_PRIVATE_KEY,GPG_PASSPHRASE(the GPG ones have never been exercised — snapshot deploy doesn't sign).releaseenvironment with a required reviewer (the approval gate).🤖 Generated with Claude Code
https://claude.ai/code/session_013DKrZ3wSe6H5HXPzg8iWC6
Summary by CodeRabbit
v*tagged releases to Maven Central with GPG-signed artifacts (including sources and Javadoc), and skips test re-runs during deployment.