S217 : build and publish pkg via mvn to gh packages #92
Open
eschultink wants to merge 3 commits intomainfrom
Open
S217 : build and publish pkg via mvn to gh packages #92eschultink wants to merge 3 commits intomainfrom
eschultink wants to merge 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR automates the publishing of Maven artifacts to GitHub Packages by introducing a GitHub Actions workflow that triggers on version tags, RC branches, or manual dispatch.
Changes:
- Refactored
pom.xmlto use a${revision}property for dynamic version management - Added a comprehensive GitHub Actions workflow for building and publishing Maven packages
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| java/pom.xml | Externalized version to a revision property to enable dynamic versioning during CI/CD |
| .github/workflows/publish-mvn-pkg-to-gh.yml | Created new workflow to automate Maven artifact publishing to GitHub Packages with support for release and snapshot builds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+116
to
+131
| # Determine if RC build; assume it is UNLESS ref is tag starting with v (e.g., v0.5.15) | ||
| RC_OPTION="--rc" | ||
| REF_NAME="${{ github.ref_name }}" | ||
| if [[ "$REF_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then | ||
| RC_OPTION="" | ||
| fi | ||
|
|
||
| BASE_VERSION=$(sed -n 's|[[:space:]]*<revision>\(.*\)</revision>|\1|p' pom.xml) | ||
|
|
||
| if [ -z "$RC_OPTION" ]; then | ||
| PUBLISHED_VERSION="${REF_NAME#v}" | ||
| BUILD_TYPE="Release" | ||
| else | ||
| PUBLISHED_VERSION="${BASE_VERSION}-SNAPSHOT" | ||
| BUILD_TYPE="Snapshot (RC)" | ||
| fi |
There was a problem hiding this comment.
The version determination logic is duplicated between the 'Publish Maven Artifacts' step (lines 73-98) and the 'Summary' step (lines 116-131). Extract this logic into a reusable function or consolidate it into a single step that sets environment variables for subsequent steps to use.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
aperez-worklytics
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
Change implications