diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7a96c3..56aa616 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,5 +63,5 @@ jobs: - name: Gradle publish run: ./gradlew publish --info --no-daemon env: - GH_USERNAME: ${{ secrets.GH_USERNAME }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_USERNAME: ${{ github.actor }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index a5e4668..0260939 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,12 @@ import org.gradle.api.JavaVersion.VERSION_21 +group = "app.quickcase" +version = "0.1.0" + plugins { `java-library` `jacoco` + `maven-publish` id("io.freefair.lombok") version "8.12.1" id("io.spring.dependency-management") version "1.1.7" } @@ -16,6 +20,39 @@ repositories { mavenCentral() } +publishing { + publications { + create("springSdk") { + from(components["java"]) + + pom { + url.set("https://github.com/quickcase/spring-sdk.git") + } + + // Capture dependency versions resolved from Spring Boot BOM via dependency management + versionMapping { + usage("java-api") { + fromResolutionOf("runtimeClasspath") + } + usage("java-runtime"){ + fromResolutionResult() + } + } + + repositories { + maven { + name = "github" + url = uri("https://maven.pkg.github.com/quickcase/spring-sdk") + credentials { + username = project.findProperty("github.user") as String? ?: System.getenv("GH_USERNAME") + password = project.findProperty("github.key") as String? ?: System.getenv("GH_TOKEN") + } + } + } + } + } +} + val versions = mapOf( "springBoot" to "3.4.2" )