-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor .github/workflows/build.yml
#74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[deploy]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR consolidates three separate GitHub Actions workflows into a single unified workflow file. The previous publish-github.yml and publish-central.yml workflows that were triggered by release events are being removed, and their functionality is being merged into build.yml as new jobs that trigger on push events with tag checks.
- Consolidated deployment workflows into a single build.yml workflow
- Added build attestation for tagged releases
- Introduced environment variable for Java version management
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/publish-github.yml | Deleted standalone workflow for GitHub Packages publishing |
| .github/workflows/publish-central.yml | Deleted standalone workflow for Maven Central publishing |
| .github/workflows/build.yml | Consolidated all build, deployment, and release logic; added attestation and changed trigger mechanism |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/build.yml
Outdated
| PROJECT_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) | ||
| test "$PROJECT_VERSION" = "$TAG_NAME" | ||
| env: | ||
| TAG_NAME: ${{ github.event.release.tag_name }} |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The github.event.release.tag_name will be null/empty when this workflow is triggered by a push event (the current trigger). The old publish-central.yml workflow was triggered by release events which made this context available. Since the workflow now triggers on push with tag checking via startsWith(github.ref, 'refs/tags/'), you should use ${GITHUB_REF##*/} instead or extract the tag name from github.ref directly, similar to how it's done in line 23.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bbded71
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughConsolidates CI workflows: removes Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Files/areas needing extra attention:
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (3)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (2)
.github/workflows/build.yml (2)
47-47: Inconsistent quoting style for distribution parameter.Line 47 quotes the value (
'temurin'), while line 79 does not. Standardize the format for consistency.--- deploy-github (around line 79) - distribution: temurin + distribution: 'temurin'Also applies to: 79-79
53-59: Refactor: Extract duplicate version verification logic.The version verification steps are identical in both deploy-central and deploy-github jobs. Consider extracting this to a reusable workflow or composite action to reduce duplication and maintenance burden.
Also applies to: 81-87
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/build.yml(1 hunks).github/workflows/publish-central.yml(0 hunks).github/workflows/publish-github.yml(0 hunks)
💤 Files with no reviewable changes (2)
- .github/workflows/publish-github.yml
- .github/workflows/publish-central.yml
🔇 Additional comments (4)
.github/workflows/build.yml (4)
24-25: Good improvement in Maven command.Using
verifyinstead ofinstallis more appropriate for CI workflows (avoids unnecessary local repo installation), and--no-transfer-progressimproves log clarity.
26-32: LGTM: Build attestation for provenance.The addition of build attestation for tag-based releases is a good security practice for supply-chain integrity.
96-108: LGTM: Release job structure.The release job correctly depends on both deploy jobs and is properly gated to tags only. Once the version verification issues in the deploy jobs are fixed, this should work as intended.
7-8: Java 25 compatibility is properly configured.Java 25 is an LTS release with support until September 2033, and the build is already well-prepared:
- maven-compiler-plugin 3.14.0 and maven-surefire-plugin 3.5.4 are recent versions known to support Java 25
jdk.version=25is explicitly set in pom.xml, matching the workflow'sJAVA_VERSION: 25- No Lombok or other known incompatible dependencies found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@overheadhunter I've opened a new pull request, #75, to work on those changes. Once the pull request is ready, I'll request review from you. |
This refactors the CI build, facilitating the ability to publish SNAPSHOTs to both Maven repos, when the commit message contains
[deploy].