From d61d2c03521272d4944cee7e027008dc15b85773 Mon Sep 17 00:00:00 2001 From: Alex Semin Date: Wed, 2 Aug 2023 20:22:17 +0200 Subject: [PATCH] Close Sonatype staging repo per OS publication --- .github/workflows/release.yml | 13 +++---------- build.gradle.kts | 6 ++++-- version.txt | 1 + 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 version.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3aacb9..f4237d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: - name: Publish the shared and macOS artifacts if: matrix.os == 'macOS-latest' - run: ./gradlew :publishAllPublicationsToSonatypeRepository --no-parallel + run: ./gradlew :publishAllPublicationsToSonatypeRepository :closeAndReleaseSonatypeStagingRepository --no-parallel env: ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}} ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}} @@ -47,7 +47,7 @@ jobs: - name: Publish the windows artifact if: matrix.os == 'windows-latest' - run: ./gradlew :publishMingwX64PublicationToSonatypeRepository --no-parallel + run: ./gradlew :publishMingwX64PublicationToSonatypeRepository :closeAndReleaseSonatypeStagingRepository --no-parallel env: ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}} ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}} @@ -57,17 +57,10 @@ jobs: - name: Publish the linux artifact if: matrix.os == 'ubuntu-latest' - run: ./gradlew :publishLinuxX64PublicationToSonatypeRepository --no-parallel + run: ./gradlew :publishLinuxX64PublicationToSonatypeRepository :closeAndReleaseSonatypeStagingRepository --no-parallel env: ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}} ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}} ORG_GRADLE_PROJECT_signingPassword: ${{secrets.SIGNING_PASSWORD}} ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.SONATYPE_USERNAME}} ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.SONATYPE_PASSWORD}} - - # https://github.com/gradle-nexus/publish-plugin#publishing-and-closing-in-different-gradle-invocations - - name: Release from staging - run: ./gradlew findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository --no-parallel - env: - ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.SONATYPE_USERNAME}} - ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.SONATYPE_PASSWORD}} diff --git a/build.gradle.kts b/build.gradle.kts index 544cbfe..388d773 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,14 @@ plugins { buildsrc.conventions.`kotlin-multiplatform` buildsrc.conventions.`maven-publishing` - id("io.github.gradle-nexus.publish-plugin") version "1.2.0" + id("io.github.gradle-nexus.publish-plugin") version "1.3.0" id("org.jetbrains.dokka") } +val publishVersion = project.layout.projectDirectory.file("version.txt").asFile.readText().trim() + group = "me.alllex.parsus" -version = "0.5.1-SNAPSHOT" +version = publishVersion kotlin { sourceSets { diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..3b2a393 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.5.2-SNAPSHOT