Closed lamba92 closed 3 years ago
publishToSonatype
and closeRepository
(or closeAndReleaseRepository
) has to be used in the same call to share stagingRepositoryId. GNSP + NPP don't support releasing from multiple builds and probably will not.
However, I and Marc (the author of NPP) wrote a brand new releasing plugin which also doesn't support it yet, but there is a plan to implement it one day :-). See https://github.com/gradle-nexus/publish-plugin/issues/59 (and https://github.com/gradle-nexus/publish-plugin/issues/19) to comment if it would be sufficient for you (once implemented).
In project kotlingram I am trying to publish a Kotlin/Multipaltform project that needs Windows, MacOs and Linux, and uses GitHub Actions to do so (see
publication_ci.yml
).The Nexus Staging Plugin seems to not honor the repository name when creating one with task
createRepository
, instead naming the repository withcomgithublamba92-{random_number}
and ignoring the valuestagingRepositoryId.set(rootProject.name)
set in root build.gradle.kts.I am also using the Nexus Publish Plugin which when executing
gradlew publishToSonatype
do not honor the repository id set by root staging plugin and instead generates a staging repository for each machine.When invoking
closeRepository
it errors saying:Probably related to nexus-publish-plugin/#53