diff --git a/.github/workflows/sdk-generation.yaml b/.github/workflows/sdk-generation.yaml index 3e9d8177..f6993e94 100644 --- a/.github/workflows/sdk-generation.yaml +++ b/.github/workflows/sdk-generation.yaml @@ -104,7 +104,7 @@ on: required: false type: string use_sonatype_central: - description: "When publishing the Java SDK, use to the Sonatype central portal" + description: "When publishing the Java SDK, use the Sonatype central portal" default: "false" required: false type: string @@ -1061,16 +1061,18 @@ jobs: java-version: "11" distribution: "corretto" cache: "gradle" - - run: |- + - name: Publish to Sonatype (legacy) + run: |- pwd ./gradlew publish --no-daemon - if: ${{ inputs.use_sonatype_central == 'false' }} + if: ${{ inputs.use_sonatype_central != 'true' }} env: MAVEN_USERNAME: ${{ secrets.ossrh_username }} MAVEN_PASSWORD: ${{ secrets.ossrh_password }} ORG_GRADLE_PROJECT_signingKey: ${{ secrets.java_gpg_secret_key }} ORG_GRADLE_PROJECT_signingPassphrase: ${{ secrets.java_gpg_passphrase }} - - run: |- + - name: Publish to Sonatype Central + run: |- pwd ./gradlew build sonatypeCentralUpload --no-daemon if: ${{ inputs.use_sonatype_central == 'true' }} diff --git a/.github/workflows/sdk-publish.yaml b/.github/workflows/sdk-publish.yaml index 3937f760..45ef5382 100644 --- a/.github/workflows/sdk-publish.yaml +++ b/.github/workflows/sdk-publish.yaml @@ -24,7 +24,7 @@ on: required: false type: string use_sonatype_central: - description: "When publishing the Java SDK, use to the Sonatype central portal" + description: "When publishing the Java SDK, use the Sonatype central portal" default: "false" required: false type: string @@ -239,18 +239,20 @@ jobs: java-version: "11" distribution: "corretto" cache: "gradle" - - run: |- + - name: Publish to Sonatype (legacy) + run: |- pwd ./gradlew publish --no-daemon - if: ${{ inputs.use_sonatype_central == 'false' }} + if: ${{ inputs.use_sonatype_central != 'true' }} env: MAVEN_USERNAME: ${{ secrets.ossrh_username }} MAVEN_PASSWORD: ${{ secrets.ossrh_password }} ORG_GRADLE_PROJECT_signingKey: ${{ secrets.java_gpg_secret_key }} ORG_GRADLE_PROJECT_signingPassphrase: ${{ secrets.java_gpg_passphrase }} - - run: |- + - name: Publish to Sonatype Central + run: |- pwd - ./gradlew sonatypeCentralUpload --no-daemon + ./gradlew build sonatypeCentralUpload --no-daemon if: ${{ inputs.use_sonatype_central == 'true' }} env: SONATYPE_USERNAME: ${{ secrets.ossrh_username }} diff --git a/action.yml b/action.yml index 5fde4c87..053a5592 100644 --- a/action.yml +++ b/action.yml @@ -111,7 +111,7 @@ inputs: default: "false" required: false use_sonatype_central: - description: "When publishing the Java SDK, use to the Sonatype central portal" + description: "When publishing the Java SDK, use the Sonatype central portal" default: "false" required: false publish_csharp: