diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 532602d..4c4f715 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -18,7 +18,13 @@ jobs: distribution: 'temurin' java-version: 17 - name: Publish + run: | + NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) + echo "New version: ${NEW_VERSION}" + export ORG_GRADLE_PROJECT_VERSION_NAME=${NEW_VERSION} + ./gradlew publish --stacktrace env: - MAVEN_USER: ${{ secrets.MAVEN_USER }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - run: ./gradlew publish + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index f16b5e6..fd610a5 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -81,11 +81,9 @@ tasks.named("jvmTest") { } mavenPublishing { - publishToMavenCentral(SonatypeHost.DEFAULT, true) + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true) signAllPublications() - coordinates("de.frederikbertling.kosc", "core", "0.1.0") - pom { name.set("kOSC core library") description.set("OSC implementation for kotlin multiplatform") diff --git a/udp/build.gradle.kts b/udp/build.gradle.kts index 8fe8a03..e612ac6 100644 --- a/udp/build.gradle.kts +++ b/udp/build.gradle.kts @@ -83,12 +83,10 @@ tasks.named("jvmTest") { } mavenPublishing { - publishToMavenCentral(SonatypeHost.DEFAULT, true) + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true) signAllPublications() - coordinates("de.frederikbertling.kosc", "udp", "0.1.0") - pom { name.set("kOSC UDP server and client implementation") description.set("OSC over UDP implementation for kotlin multiplatform") diff --git a/udp/src/commonTest/kotlin/de.frederikbertling.kosc.udp.test/OSCUDPSocketTest.kt b/udp/src/commonTest/kotlin/de.frederikbertling.kosc.udp.test/OSCUDPSocketTest.kt index b35d4f9..6b5a7dc 100644 --- a/udp/src/commonTest/kotlin/de.frederikbertling.kosc.udp.test/OSCUDPSocketTest.kt +++ b/udp/src/commonTest/kotlin/de.frederikbertling.kosc.udp.test/OSCUDPSocketTest.kt @@ -20,7 +20,7 @@ class OSCUDPSocketTest : StringSpec() { init { "OSCUDPSocket test #1" { - val port = Random.nextInt(8080..30000) + val port = Random.nextInt(8080..8090) val listener = OSCUDPSocket(port) val client = OSCUDPSocket("localhost", port) testClient(client, listener) @@ -29,7 +29,7 @@ class OSCUDPSocketTest : StringSpec() { } "OSCUDPSocket test #2" { - val port = Random.nextInt(8080..30000) + val port = Random.nextInt(8080..8090) val listener = OSCUDPSocket(port) val client = OSCUDPSocket(InetSocketAddress("localhost", port)) testClient(client, listener) @@ -38,14 +38,14 @@ class OSCUDPSocketTest : StringSpec() { } "OSCUDPSocket test #3" { - val port = Random.nextInt(8080..30000) + val port = Random.nextInt(8080..8090) val listenerClient = OSCUDPSocket("localhost", port, port) testClient(listenerClient, listenerClient) listenerClient.close() } "OSCUDPSocket test #4" { - val port = Random.nextInt(8080..30000) + val port = Random.nextInt(8080..8090) val listenerClient = OSCUDPSocket( localAddress = InetSocketAddress("localhost", port), remoteAddress = InetSocketAddress("localhost", port)