https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Arkadii Ivanov

03/07/2021, 11:57 AM
A question about publishing to Maven Central. I have a library on GitHub and a publication setup via GitHub Actions. There are 5 jobs that publish different targets in parallel. The issue is that it creates multiple staging repositories in Nexus Repository Manager. So I have some questions: 1. Is it a problem at all? Maybe I should just close/release all the created repositories? 2. How people usually approach publications of MPP libs to Maven Central, specially if there are targets that must be built on different hosts (macOS/Windows/etc)
👀 1
a

Arkadii Ivanov

03/07/2021, 12:55 PM
Thanks @Big Chungus, this article is indeed useful, but it does not cover this particular topic, unless I'm missing something.
b

Big Chungus

03/07/2021, 12:57 PM
Have a read through that entire slack thread. Might be something directly useful for you there.
j

Javier

03/07/2021, 1:08 PM
The easier way is just configure as normal and close the repos (one per machine), but you can take a look to @mbonnin GitHub, he has an action to just use one repo
m

mbonnin

03/07/2021, 2:31 PM
The action creates a staging repo and forwards the repositoryId to different jobs
Closing individual repos works 'most of the times'. I've seen cases of split staging repos even when publishing from a single vm
j

Javier

03/07/2021, 3:05 PM
Yeah, in these cases, I just drop them because they usually are corrupted
The nexus-gradle plugin or your approach should fix this problem I think
m

mbonnin

03/07/2021, 3:13 PM
j

Javier

03/07/2021, 3:14 PM
Yeah
👍 1
a

Arkadii Ivanov

03/07/2021, 3:51 PM
Thanks, I will check!
@Javier could explain in more detail how this plugin can fix the problem? The publication is executed separately from different hosts.
j

Javier

03/07/2021, 3:58 PM
That plugin doesn't fix that problem at this moment. It fixes a problem where you get a random number of repos. For example, having only one machine, you should only get one repo, but sometimes, you get like 3 or 4 repos with the artifacts mixed randomly. That plugin ensures you get 1 repo per machine.
a

Arkadii Ivanov

03/07/2021, 3:59 PM
That makes sense, thanks. I will try the GitHub action trick.
Thanks @mbonnin, the Action works like a charm!
👍 1