Skip to content

S217 : build and publish pkg via mvn to gh packages #92

Open
eschultink wants to merge 3 commits intomainfrom
s217-build-and-publish-pkg
Open

S217 : build and publish pkg via mvn to gh packages #92
eschultink wants to merge 3 commits intomainfrom
s217-build-and-publish-pkg

Conversation

@eschultink
Copy link
Member

@eschultink eschultink commented Jan 23, 2026

Features

  • automate publishing this via GH packages

Change implications

  • breaking change to API? no
  • changes dependencies? no

Copy link
Contributor

Copilot AI left a 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 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.xml to 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
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants