Skip to content

Commit

Permalink
Close Sonatype staging repo per OS publication
Browse files Browse the repository at this point in the history
  • Loading branch information
alllex committed Aug 2, 2023
1 parent d4292f5 commit d61d2c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}
Expand All @@ -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}}
6 changes: 4 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.5.2-SNAPSHOT

0 comments on commit d61d2c0

Please sign in to comment.