diff --git a/.github/workflows/package-and-publish.yml b/.github/workflows/package-and-publish.yml index 4730b2e..8cbcc7b 100644 --- a/.github/workflows/package-and-publish.yml +++ b/.github/workflows/package-and-publish.yml @@ -19,8 +19,8 @@ jobs: with: java-version: '17' distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + server-id: github + settings-path: ${{ github.workspace }} - name: Setup Gradle uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 @@ -28,10 +28,8 @@ jobs: - name: Build with Gradle run: ./gradlew build - # The USERNAME and TOKEN need to correspond to the credentials environment variables used in - # the publishing section of your build.gradle - name: Publish with Gradle to Maven - run: ./gradlew publish + run: ./gradlew publishToSonatype closeSonatypeStagingRepository releaseSonatypeStagingRepository env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}