Closed Andrapyre closed 4 months ago
@lihaoyi , could you take a look at this? A few open questions:
PublishModule
or by creating a new SonatypeCentralPublishModule
or something like it?PublishModule
affecting binary compat. Basically, I refactored as many publish options as possible into two case classes (one for legacy publishing and one for central publishing) that the user can configure, instead of having the user pass them directly into the publish
function. Is breaking binary compat acceptable here, since mill still hasn't hit version 1.0.0
?./out/central-publish
. Let me know if that should change (I don't think the older Sonatype implementation outputted any jar files, unless I'm mistaken) or if the directory should be configurable.I've updated with requested changes and documentation. Before I go on to add tests, could you review and approve the current implementation?
@lefou and @nightscape , just making sure this doesn't get lost.
@lefou how would the separate PublishModule
work with e.g. mill-ci-release which extends PublishModule
and provides additional functionality on top?
@lefou ping 😉
@nightscape , mill-ci-release
would need a new module that extends SonatypeCentralPublishModule
. The two publishing processes (standard and Sonatype Central) are different enough that @lefou is probably right that these should live in separate modules.
I can't say much about mill-ci-release
, which I don't use. (I think publishing with Mill built-in support is already straight forward, given that you have a properly setup pgp/gpg key.) If mill-ci-release
needs to be aware of any additional target not already provided by PublishModule
(which you could mix-in), then it most likely also needs extra customizations.
@lefou , this PR is ready to be reviewed. I have made all requested changes (e.g. this is now a contrib module, no changes to bincompat, removed case classes, etc). Could you explain why this PR was changed to draft with a reference to your previous comment?
@Andrapyre I somehow missed, that you already changed to PR. Sorry for that.
Can you please update the PR description to reflect the current state?
Done.
Description
This PR adds support for the new Sonatype Central publishing api, documented here and here. To use, ensure that your environment variables contain the appropriate credentials and configure your module like so in
build.sc
:New Dependencies
This PR introduces the following new dependency: