diff --git a/.github/workflows/releaase-to-central-sonatype.yml b/.github/workflows/releaase-to-central-sonatype.yml new file mode 100644 index 0000000..3fa9cd8 --- /dev/null +++ b/.github/workflows/releaase-to-central-sonatype.yml @@ -0,0 +1,26 @@ +name: build and publish a release to Central Sonatype + +#on: +# release: +# types: [published] + +jobs: + build: + runs-on: macOS-latest + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + - name: Release to Central Sonatype with Gradle + run: ./gradlew build publishAggregationPublicationsToSonatypePortalRepository \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 794f884..6dac86a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ plugins { -// id("root.publication") `maven-publish` //trick: for the same plugin versions in all sub-modules alias(libs.plugins.androidLibrary).apply(false) diff --git a/gradle.properties b/gradle.properties index f17753f..8d81137 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,15 +15,6 @@ android.nonTransitiveRClass=true LIBRARY_VERSION=0.1 GROUP=com.tddworks -signing.keyId=[keyId] -signing.password=[password] -signing.secretKeyRingFile=[secretKeyRingFile] - -# OSS TODO -SONATYPE_HOST=DEFAULT -RELEASE_SIGNING_ENABLED=true -SONATYPE_AUTOMATIC_RELEASE=true - # POM POM_NAME=OpenAI Kotlin POM_DESCRIPTION=OpenAI API KMP Client