Skip to content

Commit

Permalink
Merge branch 'main' into refactor-core3
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesDuboisSAP authored Oct 17, 2024
2 parents d4d98fc + a509116 commit 89e9f21
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 54 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/perform-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
54 changes: 19 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,9 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
Expand All @@ -507,7 +508,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
<goals>
<goal>delombok</goal>
</goals>
<phase>generate-sources</phase>
<phase>process-sources</phase>
<configuration>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
Expand Down Expand Up @@ -575,26 +576,20 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>deploy-file</goal>
</goals>
<phase>deploy</phase>
<configuration>
<url>file:./temp_local_repo</url>
<repositoryId>local</repositoryId>
<file>${project.basedir}/target/${project.artifactId}-${project.version}.jar</file>
<sources>${project.basedir}/target/${project.artifactId}-${project.version}-sources.jar</sources>
<javadoc>${project.basedir}/target/${project.artifactId}-${project.version}-javadoc.jar</javadoc>
<pomFile>${project.basedir}/pom.xml</pomFile>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<packaging>${project.packaging}</packaging>
</configuration>
</execution>
</executions>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<deploymentName>SAP AI SDK ${project.version}</deploymentName>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -632,19 +627,8 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<configuration>
<file>${project.basedir}/pom.xml</file>
<!-- The parent has no sources -->
<sources>${empty.property}</sources>
<javadoc>${empty.property}</javadoc>
</configuration>
</execution>
</executions>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 89e9f21

Please sign in to comment.