From fdd901fe1c4d219993000d565e161510d862c705 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 22 Oct 2025 18:09:22 +0530 Subject: [PATCH 1/6] testing release workflow --- .github/workflows/maven-publish.yml | 19 +++++++++++-------- pom.xml | 22 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index bd74108..d4e4f4e 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,5 +1,8 @@ name: Publish package to the Maven Central Repository on: + push: + branches: + - fix/DX-3277-update-release-workflow release: types: [created] jobs: @@ -15,16 +18,16 @@ jobs: with: java-version: '17' distribution: 'adopt' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: GPG_PASSPHRASE - - name: Publish package + - name: Publish to the Maven Central Repository run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} publish-github: runs-on: ubuntu-latest @@ -38,15 +41,15 @@ jobs: server-id: github gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} - - name: Set up Maven settings for OSSRH + - name: Set up Maven settings for Central and GitHub run: | mkdir -p $HOME/.m2 echo " - ossrh - ${{ secrets.OSSRH_USERNAME }} - ${{ secrets.OSSRH_PASSWORD }} + central + ${{ secrets.MAVEN_USERNAME }} + ${{ secrets.MAVEN_PASSWORD }} github diff --git a/pom.xml b/pom.xml index 885a39e..14f51fe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.contentstack.sdk utils - 1.2.15 + 1.2.16-beta jar Contentstack-utils Java Utils SDK for Contentstack Content Delivery API, Contentstack is a headless CMS @@ -24,7 +24,7 @@ 1.1.1 3.3 1.5 - 1.6.7 + 1.0.0 2.5.3 2.0.1.Final 20250107 @@ -41,6 +41,8 @@ + + https://github.com/contentstack/contentstack-utils-java @@ -228,6 +231,8 @@ + + + + + org.sonatype.central + central-publishing-maven-plugin + ${central-publishing-maven-plugin.version} + true + + central + true + published + + org.apache.maven.plugins maven-compiler-plugin From d639da08044c4f058a6cb4448aa01a5561ec5c3e Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 22 Oct 2025 18:12:07 +0530 Subject: [PATCH 2/6] testing release workflow1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 14f51fe..62b16af 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 1.1.1 3.3 1.5 - 1.0.0 + 0.8.0 2.5.3 2.0.1.Final 20250107 From 207e7fac9f452d3285680811dfa9b215bf9a537b Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 22 Oct 2025 18:25:40 +0530 Subject: [PATCH 3/6] chore: pom file version change --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62b16af..99c51f5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.contentstack.sdk utils - 1.2.16-beta + 1.2.15 jar Contentstack-utils Java Utils SDK for Contentstack Content Delivery API, Contentstack is a headless CMS From 19ae6b20ff19bb7bdb18558d9d6c51f79cd7a339 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 22 Oct 2025 18:27:44 +0530 Subject: [PATCH 4/6] changes --- .github/workflows/maven-publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index d4e4f4e..e7e1b76 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,8 +1,5 @@ name: Publish package to the Maven Central Repository on: - push: - branches: - - fix/DX-3277-update-release-workflow release: types: [created] jobs: From 2ba191d320586d5d46dbffeff833c9f8a2cc0644 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 29 Oct 2025 11:22:13 +0530 Subject: [PATCH 5/6] snyk fixes --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 99c51f5..ab83569 100644 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,8 @@ 2.5.3 2.0.1.Final 20250107 - 6.2.2 - 1.13.0 + 6.2.11 + 1.14.0 From 2c01ac2c22b2a2c8b92f3c3930c5071f67d6d744 Mon Sep 17 00:00:00 2001 From: harshithad0703 <104908717+harshithad0703@users.noreply.github.com> Date: Fri, 31 Oct 2025 11:18:25 +0530 Subject: [PATCH 6/6] Change branch restriction from 'next' to 'staging' --- .github/workflows/check-branch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-branch.yml b/.github/workflows/check-branch.yml index 1e2d24a..5a6b9c8 100644 --- a/.github/workflows/check-branch.yml +++ b/.github/workflows/check-branch.yml @@ -8,13 +8,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Comment PR - if: github.base_ref == 'master' && github.head_ref != 'next' + if: github.base_ref == 'master' && github.head_ref != 'staging' uses: thollander/actions-comment-pull-request@v2 with: message: | We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch. - name: Check branch - if: github.base_ref == 'master' && github.head_ref != 'next' + if: github.base_ref == 'master' && github.head_ref != 'staging' run: | echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch." - exit 1 \ No newline at end of file + exit 1