Add automated Maven Central publishing to release workflow - #100
Conversation
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
d0b9c69 to
97c7e18
Compare
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe release workflow now defines a publishing job that retrieves AWS-managed credentials, imports a GPG signing key, deploys Valkey Maven modules to Maven Central, and removes an open staging repository when deployment fails. ChangesMaven Central publishing
Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant AWSSecretsManager
participant GPG
participant MavenCentral
GitHubActions->>AWSSecretsManager: Retrieve Maven and GPG credentials
AWSSecretsManager-->>GitHubActions: Return validated secrets
GitHubActions->>GPG: Import and verify private key
GitHubActions->>MavenCentral: Deploy signed Valkey modules
MavenCentral-->>GitHubActions: Report deployment result
GitHubActions->>MavenCentral: Delete the matching open staging repository after failure
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 195-202: Update the release workflow cleanup around REPOS and
REPO_KEY so it identifies the staging repository created by the current
deployment instead of blindly selecting .repositories[0]. Capture repository
keys before publishing and exclude them from cleanup, or reuse the staging
repository ID emitted by the publishing plugin, then delete only that matched
repository while preserving the existing drop request.
- Around line 102-103: Update the Checkout step using actions/checkout@v4 to
disable persisted credentials, and scope contents write permission only to the
specific job or step that requires publishing rather than the Maven steps.
Preserve checkout functionality while ensuring later Maven/plugin commands
cannot access the workflow token through Git.
🪄 Autofix
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b61fcc23-89c1-44e6-b1b3-7ff3789cab21
📒 Files selected for processing (1)
.github/workflows/release.yml
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
|
@jeremyprime did you migrated the creds from my AWS accout? |
Yes, I updated the existing The GitHub action assumes an IAM role which allows it to read that and other secrets (all in the Valkey Clients account) to perform the GPG signing and then publish to Maven Central. |
Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
Summary
Adds a publish job to the release workflow that signs and deploys artifacts to Maven Central (staging) after the existing build/test/release steps complete.
Closes #85
Changes
Prerequisites
Testing