diff --git a/.github/workflows/release-cd.yml b/.github/workflows/release-cd.yml index 115838d..78ad62e 100644 --- a/.github/workflows/release-cd.yml +++ b/.github/workflows/release-cd.yml @@ -37,7 +37,7 @@ jobs: release-cd: name: release-cd - runs-on: ubuntu-latest + runs-on: macos-latest needs: release-please if: ${{ needs.release-please.outputs.release_created == 'true' }} @@ -70,40 +70,25 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 - # 테스트, 컴파일 검증 및 aar 생성 - - name: Verify and build release AAR + # 테스트 및 컴파일 검증 + - name: Verify release build run: | ./gradlew --no-daemon --stacktrace \ :graph-visualizer:testDebugUnitTest \ :graph-visualizer:compileKotlinMetadata \ :graph-visualizer:compileKotlinJs \ - :graph-visualizer:compileKotlinWasmJs \ - :graph-visualizer:assembleRelease - - # 생성된 release AAR를 릴리즈 업로드용 이름으로 정리 - - name: Prepare release asset - env: - VERSION: ${{ needs.release-please.outputs.version }} - run: | - set -euo pipefail - - input_aar="graph-visualizer/build/outputs/aar/graph-visualizer-release.aar" - if [ ! -f "${input_aar}" ]; then - echo "Missing release AAR: ${input_aar}" >&2 - exit 1 - fi - - mkdir -p dist - output_aar="dist/graph-visualizer-${VERSION}.aar" - cp "${input_aar}" "${output_aar}" + :graph-visualizer:compileKotlinWasmJs - # 생성된 GitHub Release에 AAR 파일 첨부 - - name: Upload assets to GitHub Release + # Maven Central(Sonatype)로 publish + - name: Publish and release to Maven Central env: - GITHUB_TOKEN: ${{ github.token }} - TAG: ${{ needs.release-please.outputs.tag_name }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} VERSION: ${{ needs.release-please.outputs.version }} run: | - gh release upload "${TAG}" \ - "dist/graph-visualizer-${VERSION}.aar" \ - --clobber + ./gradlew --no-daemon --stacktrace --no-configuration-cache \ + -Pversion="${VERSION}" \ + :graph-visualizer:publishAndReleaseToMavenCentral diff --git a/README.md b/README.md index 1d2e9c3..dcd8923 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Koraph -[![](https://jitpack.io/v/rootachieve/Koraph.svg)](https://jitpack.io/#rootachieve/Koraph) +![Image](https://github.com/user-attachments/assets/a33957e1-f4bc-429e-a9ff-c58f99fe1187) + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.rootachieve/Koraph)](https://central.sonatype.com/artifact/io.github.rootachieve/Koraph) > Koraph is a Compose Multiplatform graph visualization library for turning adjacency maps into interactive node-link diagrams. @@ -24,7 +26,7 @@ You can try the web sample app at: ### Gradle -Assuming a release tag is already published to JitPack: +Koraph releases are published to Maven Central: ```kotlin // settings.gradle.kts @@ -33,7 +35,6 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven("https://jitpack.io") } } ``` @@ -41,8 +42,7 @@ dependencyResolutionManagement { ```kotlin // build.gradle.kts dependencies { - // all published modules (recommended for simple onboarding) - implementation("com.github.rootachieve:Koraph:") + implementation("io.github.rootachieve:Koraph:") } ``` ### Build diff --git a/build.gradle.kts b/build.gradle.kts index cf780d5..fdfc6af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,4 +6,4 @@ plugins { alias(libs.plugins.composeMultiplatform) apply false alias(libs.plugins.composeCompiler) apply false alias(libs.plugins.kotlinMultiplatform) apply false -} \ No newline at end of file +} diff --git a/graph-visualizer/build.gradle.kts b/graph-visualizer/build.gradle.kts index 0a58c4d..595a590 100644 --- a/graph-visualizer/build.gradle.kts +++ b/graph-visualizer/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.api.publish.maven.MavenPublication import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget @@ -7,11 +6,13 @@ plugins { alias(libs.plugins.androidLibrary) alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) - id("maven-publish") + id("com.vanniktech.maven.publish") version "0.35.0" } -group = "com.rootachieve.koraph" -version = "0.1.0-SNAPSHOT" +group = "io.github.rootachieve" +version = (findProperty("VERSION_NAME") as String?) + ?: (findProperty("version") as String?) + ?: "0.1.0-SNAPSHOT" kotlin { androidTarget { @@ -59,19 +60,40 @@ android { } } -publishing { - publications.withType().configureEach { - pom { - name.set("Koraph Graph Visualizer") - description.set("Compose Multiplatform graph visualization library for adjacency-list inputs.") - url.set("https://github.com/rootachieve/Koraph") +mavenPublishing { + publishToMavenCentral() + signAllPublications() + coordinates(group.toString(), "Koraph", version.toString()) + + pom { + name.set("Koraph Graph Visualizer") + description.set("Compose Multiplatform graph visualization library for adjacency-list inputs.") + inceptionYear.set("2026") + url.set("https://github.com/rootachieve/Koraph") + + licenses { + license { + name.set("Apache License 2.0") + url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") + distribution.set("https://www.apache.org/licenses/LICENSE-2.0.txt") + } + } - licenses { - license { - name.set("Apache License 2.0") - url.set("https://www.apache.org/licenses/LICENSE-2.0") - } + developers { + developer { + id.set("rootachieve") + name.set("rootachieve") + email.set("rootachieve6053@gmail.com") + organization.set("rootachieve") + organizationUrl.set("https://github.com/rootachieve") + url.set("https://github.com/rootachieve") } } + + scm { + url.set("https://github.com/rootachieve/Koraph") + connection.set("scm:git:git://github.com/rootachieve/Koraph.git") + developerConnection.set("scm:git:ssh://git@github.com/rootachieve/Koraph.git") + } } }