You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where `MILL_PGP_PASSPHRASE`, `MILL_PGP_SECRET_BASE64`, `MILL_SONATYPE_PASSWORD`, and
110
+
`MILL_SONATYPE_USERNAME` configured for the repository's or organization's Github Actions
111
+
workflows. See
112
+
https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions[Using Secrets in Github Actions]
113
+
for more details.
114
+
115
+
116
+
== Instructions for Publishing to Maven Central via Legacy OSSHR (Deprecated)
117
+
118
+
[NOTE]
119
+
--
120
+
Publishing via the legacy OSSRH (OSS Repository Hosting) is deprecated and will reach end-of-life on June 30, 2025,
121
+
due to the retirement of https://help.sonatype.com/en/sonatype-nexus-repository-2-sunsetting-information.html[Sonatype’s Nexus Repository Manager v2]. Sonatype now recommends using the https://central.sonatype.org/publish/publish-portal-guide/[Central Portal] for all new publishing.
122
+
Migration is strongly encouraged to avoid disruptions. For full details, see the https://central.sonatype.org/news/20250326_ossrh_sunset/[OSSRH Sunset Announcement].
123
+
--
124
+
125
+
Just like publishing via the Central Portal requires a GPG key and publish secrets,
126
+
publishing via the legacy OSSHR(OSS Repository Hosting) also requires them.
127
+
128
+
=== Publishing
129
+
47
130
You can publish all eligible modules in your Mill project using
48
131
the xref:fundamentals/modules.adoc#_default_tasks[default task] of the
The `publishAll` task can be called from the CLI. If a required value is not provided via the CLI option,
256
+
it will fall back to an environment variable (if available) or raise an error if missing.
257
+
258
+
The `./mill mill.scalalib.SonatypeCentralPublishModule/publishAll` takes the following options:
259
+
260
+
`username`: The username for calling the Sonatype Central publishing api. Defaults to the `SONATYPE_USERNAME` environment variable if unset. If neither the parameter nor the environment variable are set, an error will be thrown. +
261
+
262
+
`password`: The password for calling the Sonatype Central publishing api. Defaults to the `SONATYPE_PASSWORD` environment variable if unset. If neither the parameter nor the environment variable are set, an error will be thrown. +
263
+
264
+
`gpgArgs`: Arguments to pass to the gpg package for signing artifacts. Uses the `MILL_PGP_PASSPHRASE` environment variable if set. _Default: `[--passphrase=$MILL_PGP_PASSPHRASE], --no-tty, --pinentry-mode, loopback, --batch, --yes, -a, -b`._ +
265
+
266
+
`publishArtifacts`: The command for generating all publishable artifacts (ex. `__.publishArtifacts`). Required. +
267
+
268
+
`readTimeout`: The timeout for receiving a response from Sonatype Central after the initial connection has occurred. _Default: 60000._ +
269
+
270
+
`awaitTimeout`: The overall timeout for all retries (including exponential backoff) of the bundle upload. _Default: 120 * 1000._ +
271
+
272
+
`connectTimeout`: The timeout for the initial connection to Sonatype Central if there is no response. _Default: 5000._ +
273
+
274
+
`shouldRelease`: Whether the bundle should be automatically released when uploaded to Sonatype Central. If `false`, the bundle will still be uploaded, but users will need to manually log in to Sonatype Central and publish the bundle from the portal. _Default: true_ +
275
+
276
+
`bundleName`: If set, all packages will be uploaded in a single bundle with the given name. If unset, packages will be uploaded separately. Recommended bundle name syntax: groupName-artifactId-versionNumber. As an example, if publishing the `com.lihaoyi` `requests` package, without the bundle name, four different bundles will be uploaded, one for each scala version supported. With a bundle name of `com.lihaoyi-requests-<new_version>`, a single bundle will be uploaded that contains all packages across scala versions. It is recommended to set the bundle name, so that packages can be verified and deployed together. _Default: No bundle name is set and packages will be uploaded separately_
0 commit comments