Deploy not in parallel using a matrix on multiple OSs

I have a Kotlin multiplatform project that needs to build on Windows, OSX and Linux.
Now, I want to deploy on Maven Central every time I create a release on GitHub and I managed to accomplish it (exept for Windows since using secured environmental variables crashes the build).

Problem is, the Nexus Central Repository does not allow parallel uploads and happens that while one job is uploading another one start uploading as well and fails. I could restart the job but it’s cumbersome. Is there any way to make a job wait for a step of another one? Otherwise I could turn off parallel build entirely but it sucks :frowning:

Nothing we directly support right now, I’m afraid, since the jobs don’t communicate with one another when running in parallel.

There may be some workarounds - for example, set a remote flag when upload starts, clear it when done, and proceed only when the remote flag is clear, but that’d leave the job running the entire time checking. It would require some custom scripting, too, but if the deploy is quick it might be worth a shot?

You can put the two deployment jobs into different build stages. This way, they will run sequentially.

Alternatively, you can put all deployment entries into a single job – then it will run them one after another, too. You can pass build artifacts to it via workspaces.