Skip to content

Commit

Permalink
feat: prepare for publish to maven central
Browse files Browse the repository at this point in the history
 - remove authentication use system env username and password to auth
  • Loading branch information
hanrw committed Mar 1, 2024
1 parent 0c312d1 commit cd93258
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/releaase-to-central-sonatype.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
9 changes: 0 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd93258

Please sign in to comment.