From d7b4dd1667ce2a9eda8320023cf8d7eb0c6b8eea Mon Sep 17 00:00:00 2001 From: saileshwar-skyflow Date: Mon, 1 Sep 2025 12:39:13 +0530 Subject: [PATCH 1/3] SK-2276: beta release workflow changes --- .github/workflows/beta-release.yml | 3 +- .github/workflows/shared-build-and-deploy.yml | 16 +++---- pom.xml | 45 +++++++++++++++---- scripts/bump_version.sh | 3 +- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index b30cc27f..07f04180 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -7,9 +7,10 @@ jobs: uses: ./.github/workflows/shared-build-and-deploy.yml with: ref: ${{ github.ref_name }} - server-id: ossrh + server-id: central profile: maven-central tag: 'beta' + module: 'v3' secrets: server-username: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_USERNAME }} server-password: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_PASSWORD }} diff --git a/.github/workflows/shared-build-and-deploy.yml b/.github/workflows/shared-build-and-deploy.yml index 59d2b27c..c678357e 100644 --- a/.github/workflows/shared-build-and-deploy.yml +++ b/.github/workflows/shared-build-and-deploy.yml @@ -59,9 +59,9 @@ jobs: fetch-depth: 0 - name: Set up maven or jfrog repository - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: "1.8" + java-version: "11" distribution: "adopt" server-id: ${{ inputs.server-id }} server-username: SERVER_USERNAME @@ -94,7 +94,7 @@ jobs: if ${{ inputs.tag == 'internal' }}; then ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "$(git rev-parse --short "$GITHUB_SHA")" else - ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" + ./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "" "${{ inputs.module }}" fi - name: Commit changes @@ -133,11 +133,11 @@ jobs: - name: Publish package run: | - if [ -n "${{ inputs.module }}" ]; then - mvn --batch-mode -pl v3 -am deploy -P jfrog - else - mvn --batch-mode deploy -P ${{ inputs.profile }} - fi + if [[ "${{ inputs.tag }}" == "internal" ]]; then + mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P jfrog + + elif [[ "${{ inputs.tag }}" == "beta" || "${{ inputs.tag }}" == "public" ]]; then + mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P ${{ inputs.profile }} env: SERVER_USERNAME: ${{ secrets.server-username }} diff --git a/pom.xml b/pom.xml index 372a9525..e53c88c8 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ junit junit - ${junit-version} + 4.13.2 test @@ -141,12 +141,6 @@ 2.0.9 test - - org.junit.jupiter - junit-jupiter - 5.13.2 - compile - @@ -187,7 +181,14 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.2.5 + + false + + **/*Test.java + **/*Tests.java + + org.jacoco @@ -275,5 +276,33 @@ + + maven-central + + + central + https://central.sonatype.com/api/v1/publisher/upload + + + central-snapshots + https://central.sonatype.com/api/v1/publisher/upload + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.4.0 + true + + central + true + true + + + + + \ No newline at end of file diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh index c82f6bbf..ea85e3db 100755 --- a/scripts/bump_version.sh +++ b/scripts/bump_version.sh @@ -1,7 +1,8 @@ # Input Arguments Version=$1 CommitHash=$2 -PomFile="$GITHUB_WORKSPACE/v3/pom.xml" +Module=$3 +PomFile="/home/saib/skyflow3/skyflow-java/$Module/pom.xml" if [ -z "$Version" ]; then echo "Error: Version argument is required." From 09da9c67e3d3d1f401bbed25c2716e96148b9c29 Mon Sep 17 00:00:00 2001 From: saileshwar-skyflow Date: Mon, 1 Sep 2025 12:42:26 +0530 Subject: [PATCH 2/3] SK-2276: upadte bump version. sh pom file path --- scripts/bump_version.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh index ea85e3db..c82f6bbf 100755 --- a/scripts/bump_version.sh +++ b/scripts/bump_version.sh @@ -1,8 +1,7 @@ # Input Arguments Version=$1 CommitHash=$2 -Module=$3 -PomFile="/home/saib/skyflow3/skyflow-java/$Module/pom.xml" +PomFile="$GITHUB_WORKSPACE/v3/pom.xml" if [ -z "$Version" ]; then echo "Error: Version argument is required." From 10acff3d54f1ed5e21c155511a161d55f97c8f8a Mon Sep 17 00:00:00 2001 From: saileshwar-skyflow Date: Mon, 1 Sep 2025 12:55:14 +0530 Subject: [PATCH 3/3] SK-2276: upadte pom file for v3 --- pom.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index e53c88c8..1c115553 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ junit junit - 4.13.2 + ${junit-version} test @@ -141,6 +141,12 @@ 2.0.9 test + + org.junit.jupiter + junit-jupiter + 5.13.2 + compile + @@ -181,14 +187,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 - - false - - **/*Test.java - **/*Tests.java - - + 2.22.2 org.jacoco