diff --git a/.github/workflows/perform-release.yml b/.github/workflows/perform-release.yml index ff5f3b96..02595cf7 100644 --- a/.github/workflows/perform-release.yml +++ b/.github/workflows/perform-release.yml @@ -107,28 +107,16 @@ jobs: env: PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - - name: "Deploy Locally" - run: > - mvn - $MVN_CLI_ARGS - -DaltDeploymentRepository=local::file:./temp_local_repo - -Drelease - deploy - env: - MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + - name: "Create settings.xml" + run: | + echo '${{ secrets.CENTRAL_SONATYPE_SETTINGS_XML }}' > settings.xml - - name: "Deploy Staging" + - name: "Deploy" run: | - # Create an empty directory to correctly execute the plugin - mkdir temp - cd temp - MVN_ARGS="$MVN_CLI_ARGS org.sonatype.plugins:nexus-staging-maven-plugin:1.7.0:deploy-staged-repository -DserverId=ossrh -DnexusUrl=https://oss.sonatype.org -DrepositoryDirectory=../temp_local_repo -DstagingProfileId=$MAVEN_CENTRAL_PROFILE_ID" + MVN_ARGS="${{ env.MVN_CLI_ARGS }} deploy -Drelease -s settings.xml" mvn $MVN_ARGS env: - MAVEN_CENTRAL_USER: ${{ secrets.SONATYPE_TOKEN_NAME }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASS }} - MAVEN_CENTRAL_PROFILE_ID: ${{ secrets.MAVEN_CENTRAL_PROFILE_ID }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - name: "Merge Code PR" if: ${{ inputs.skip-pr-merge != 'true' }} diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index a6bdec8a..905fc158 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -152,7 +152,7 @@ jobs: - [ ] Review the [Draft Release](${{ needs.create-release.outputs.release-url }}) - [ ] Review **and approve** this PR - [ ] Trigger the [Perform Release Workflow](${{ github.event.repository.html_url }}/actions/workflows/perform-release.yml) - - [ ] Once the `Perform Release` workflow is through, head over to the [OSS Repository](https://oss.sonatype.org/#stagingRepositories) and log in with the credentials in the Team Password Safe. There should be a staged release. Check whether everything looks good and, if so, publish the release.") + - [ ] Once the `Perform Release` workflow is through, head over to the [Central Sonatype](https://central.sonatype.com/publishing/deployments) and log in with the credentials in the Team Password Safe. There should be a published release.") echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT env: GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }} diff --git a/pom.xml b/pom.xml index 67baa27e..9e9c75d9 100644 --- a/pom.xml +++ b/pom.xml @@ -480,8 +480,9 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma 3.3.1 + attach-sources - jar + jar-no-fork package @@ -507,7 +508,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma delombok - generate-sources + process-sources ${project.basedir}/src/main/java ${project.build.directory}/delombok @@ -575,26 +576,20 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma org.apache.maven.plugins maven-deploy-plugin 3.1.3 - - - - deploy-file - - deploy - - file:./temp_local_repo - local - ${project.basedir}/target/${project.artifactId}-${project.version}.jar - ${project.basedir}/target/${project.artifactId}-${project.version}-sources.jar - ${project.basedir}/target/${project.artifactId}-${project.version}-javadoc.jar - ${project.basedir}/pom.xml - ${project.groupId} - ${project.artifactId} - ${project.version} - ${project.packaging} - - - + + true + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + SAP AI SDK ${project.version} + central + false + @@ -632,19 +627,8 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma - org.apache.maven.plugins - maven-deploy-plugin - false - - - - ${project.basedir}/pom.xml - - ${empty.property} - ${empty.property} - - - + org.sonatype.central + central-publishing-maven-plugin