diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 755dfe9..2a0d7c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,11 +5,11 @@ # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle -# gh secret set ORG_GRADLE_PROJECT_mavenCentralUsername -a actions --body "" -# gh secret set ORG_GRADLE_PROJECT_mavenCentralPassword -a actions --body "" -# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKey -a actions --body "$(gpg --export-secret-keys --armor "" | grep -v '\-\-' | grep -v '^=.' | tr -d '\n')" -# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKeyId -a actions --body "" -# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKeyPassword -a actions --body "" +# gh secret set MAVEN_CENTRAL_USERNAME -a actions --body "" +# gh secret set MAVEN_CENTRAL_PASSWORD -a actions --body "" +# gh secret set SIGNING_KEY -a actions --body "$(gpg --export-secret-keys --armor "" | grep -v '\-\-' | grep -v '^=.' | tr -d '\n')" +# gh secret set SIGNING_KEY_ID -a actions --body "" +# gh secret set SIGNING_KEY_PASSWORD -a actions --body "" name: Deploy to central @@ -23,24 +23,12 @@ jobs: uses: ./.github/workflows/gradle.yml deploy: needs: build - strategy: - matrix: - include: -# - target: publishIosArm64PublicationToMavenCentral -# os: macos-latest - - target: publishAndroidReleasePublicationToMavenCentral - os: ubuntu-latest - - target: publishJvmPublicationToMavenCentral - os: ubuntu-latest -# - target: publishLinuxX64PublicationToMavenCentral -# os: ubuntu-latest - - target: publishKotlinMultiplatformPublicationToMavenCentral - os: ubuntu-latest - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 +# Needed only for Kotlin/Native # - uses: actions/cache@v3 # with: # path: | @@ -53,5 +41,11 @@ jobs: distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - - name: Gradle publish - run: ./gradlew ${{ matrix.target }} --no-configuration-cache + - name: Publish to Maven Central + env: + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} + run: ./gradlew publishToMavenCentral --no-configuration-cache