diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..72d746e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish +on: + release: + types: [released, prereleased] +jobs: + publish: + name: Release build and publish + runs-on: macOS-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: Publish to MavenCentral + run: ./gradlew publishToMavenCentral + env: + 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 }} + diff --git a/fibonacci/build.gradle.kts b/fibonacci/build.gradle.kts index cc6e8e7..b621ce7 100644 --- a/fibonacci/build.gradle.kts +++ b/fibonacci/build.gradle.kts @@ -2,7 +2,7 @@ import com.vanniktech.maven.publish.SonatypeHost import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget -group = "io.github.pahill" +group = "io.github.kotlin-hands-on" version = "1.0.6" plugins { @@ -40,7 +40,7 @@ kotlin { } android { - namespace = "io.github.pahill.fibonacci" + namespace = "io.github.kotlinhandson.fibonacci" compileSdk = libs.versions.android.compileSdk.get().toInt() defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() @@ -52,13 +52,13 @@ mavenPublishing { signAllPublications() - coordinates("io.github.pahill", "fibonacci", "1.0.6") + coordinates("io.github.kotlin-hands-on", "fibonacci", "1.0.6") pom { name.set("Fibonacci library") description.set("A description of what my library does.") inceptionYear.set("2024") - url.set("https://github.com/pahill/fibonacci/") + url.set("https://github.com/kotlin-hands-on/fibonacci/") licenses { license { name.set("The Apache License, Version 2.0") @@ -68,15 +68,15 @@ mavenPublishing { } developers { developer { - id.set("pahill") - name.set("Pamela Hill") - url.set("https://github.com/pahill/") + id.set("kotlin-hands-on") + name.set("Kotlin Developer Advocate") + url.set("https://github.com/kotlin-hands-on/") } } scm { - url.set("https://github.com/pahill/fibonacci/") - connection.set("scm:git:git://github.com/pahill/fibonacci.git") - developerConnection.set("scm:git:ssh://git@github.com/pahill/fibonacci.git") + url.set("https://github.com/kotlin-hands-on/fibonacci/") + connection.set("scm:git:git://github.com/kotlin-hands-on/fibonacci.git") + developerConnection.set("scm:git:ssh://git@github.com/kotlin-hands-on/fibonacci.git") } } } diff --git a/fibonacci/src/androidMain/kotlin/fibiprops.android.kt b/fibonacci/src/androidMain/kotlin/fibiprops.android.kt index 32b9035..39becc5 100644 --- a/fibonacci/src/androidMain/kotlin/fibiprops.android.kt +++ b/fibonacci/src/androidMain/kotlin/fibiprops.android.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci actual val firstElement: Int = 1 actual val secondElement: Int = 2 \ No newline at end of file diff --git a/fibonacci/src/androidUnitTest/kotlin/AndroidFibiTest.kt b/fibonacci/src/androidUnitTest/kotlin/AndroidFibiTest.kt index 018beb5..dae8b84 100644 --- a/fibonacci/src/androidUnitTest/kotlin/AndroidFibiTest.kt +++ b/fibonacci/src/androidUnitTest/kotlin/AndroidFibiTest.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fibonacci/src/commonMain/kotlin/CustomFibi.kt b/fibonacci/src/commonMain/kotlin/CustomFibi.kt index b312a8a..5d08500 100644 --- a/fibonacci/src/commonMain/kotlin/CustomFibi.kt +++ b/fibonacci/src/commonMain/kotlin/CustomFibi.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci fun generateFibi() = sequence { var a = firstElement diff --git a/fibonacci/src/commonTest/kotlin/FibiTest.kt b/fibonacci/src/commonTest/kotlin/FibiTest.kt index 60dae99..00205b7 100644 --- a/fibonacci/src/commonTest/kotlin/FibiTest.kt +++ b/fibonacci/src/commonTest/kotlin/FibiTest.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fibonacci/src/iosMain/kotlin/fibiprops.ios.kt b/fibonacci/src/iosMain/kotlin/fibiprops.ios.kt index 693567b..5e67431 100644 --- a/fibonacci/src/iosMain/kotlin/fibiprops.ios.kt +++ b/fibonacci/src/iosMain/kotlin/fibiprops.ios.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci actual val firstElement: Int = 3 actual val secondElement: Int = 4 \ No newline at end of file diff --git a/fibonacci/src/iosTest/kotlin/IosFibiTest.kt b/fibonacci/src/iosTest/kotlin/IosFibiTest.kt index 41f6340..91f7d62 100644 --- a/fibonacci/src/iosTest/kotlin/IosFibiTest.kt +++ b/fibonacci/src/iosTest/kotlin/IosFibiTest.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fibonacci/src/jvmMain/kotlin/fibiprops.jvm.kt b/fibonacci/src/jvmMain/kotlin/fibiprops.jvm.kt index 33981be..aea5c19 100644 --- a/fibonacci/src/jvmMain/kotlin/fibiprops.jvm.kt +++ b/fibonacci/src/jvmMain/kotlin/fibiprops.jvm.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci actual val firstElement: Int = 2 actual val secondElement: Int = 3 \ No newline at end of file diff --git a/fibonacci/src/jvmTest/kotlin/JvmFibiTest.kt b/fibonacci/src/jvmTest/kotlin/JvmFibiTest.kt index c65aecb..66c9ce6 100644 --- a/fibonacci/src/jvmTest/kotlin/JvmFibiTest.kt +++ b/fibonacci/src/jvmTest/kotlin/JvmFibiTest.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci import kotlin.test.Test import kotlin.test.assertEquals diff --git a/fibonacci/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt b/fibonacci/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt index 5986600..90c8cf5 100644 --- a/fibonacci/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt +++ b/fibonacci/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci actual val firstElement: Int = 3 actual val secondElement: Int = 5 \ No newline at end of file diff --git a/fibonacci/src/linuxX64Test/kotlin/LinuxFibiTest.kt b/fibonacci/src/linuxX64Test/kotlin/LinuxFibiTest.kt index 66dcafd..a16d6e5 100644 --- a/fibonacci/src/linuxX64Test/kotlin/LinuxFibiTest.kt +++ b/fibonacci/src/linuxX64Test/kotlin/LinuxFibiTest.kt @@ -1,4 +1,4 @@ -package io.github.pahill.fibonacci +package io.github.kotlinhandson.fibonacci import kotlin.test.Test import kotlin.test.assertEquals