Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
exit 1
16 changes: 8 additions & 8 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,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
Expand All @@ -38,15 +38,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 "<settings>
<servers>
<server>
<id>ossrh</id>
<username>${{ secrets.OSSRH_USERNAME }}</username>
<password>${{ secrets.OSSRH_PASSWORD }}</password>
<id>central</id>
<username>${{ secrets.MAVEN_USERNAME }}</username>
<password>${{ secrets.MAVEN_PASSWORD }}</password>
</server>
<server>
<id>github</id>
Expand Down
24 changes: 21 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<json.simple.version>1.1.1</json.simple.version>
<maven-site-plugin.version>3.3</maven-site-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<validation-version>2.0.1.Final</validation-version>
<json-version>20250107</json-version>
<spring-web-version>6.2.2</spring-web-version>
<org.apache.commons-text>1.13.0</org.apache.commons-text>
<spring-web-version>6.2.11</spring-web-version>
<org.apache.commons-text>1.14.0</org.apache.commons-text>
</properties>

<developers>
Expand All @@ -41,6 +41,8 @@
</developer>
</developers>

<!-- Old OSSRH configuration - no longer needed with central-publishing-maven-plugin -->
<!--
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand All @@ -51,6 +53,7 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
-->

<scm>
<url>https://github.com/contentstack/contentstack-utils-java</url>
Expand Down Expand Up @@ -228,6 +231,8 @@
</execution>
</executions>
</plugin>
<!-- Old nexus-staging-maven-plugin - no longer supported -->
<!--
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand All @@ -239,6 +244,19 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
-->
<!-- New Central Publishing Plugin for Maven Central -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
Loading