Create ~/.sbt/sonatype.credentials
:
realm=Sonatype Nexus Repository Manager
host=s01.oss.sonatype.org
user=
password=
- Install GnuPG
- Generate and publish GnuPG key
- Follow instructions at https://central.sonatype.org/publish/requirements/gpg
- Save GnuPG key passphrase, which is needed during the
sbt publishSigned
step
nix-shell --command 'sbt clean publishSigned sonatypeBundleRelease'
- Below are all the granular steps that the automatic publishing does
- You can view what is happening at the Sonatype Repository Manager after calling
sonatypePrepare
nix-shell
sbt
clean
publishSigned
sonatypePrepare
sonatypeBundleUpload
sonatypeClose
sonatypePromote
- If you get something like
[info] gpg: signing failed: Inappropriate ioctl for device
, run- Fish:
set -x GPG_TTY (tty)
- Bash:
export GPG_TTY=$(tty)
- Fish:
- If sbt hangs on
signedArtifacts
, kill thegpg-agent
process - If you get an error like
no javadoc jar found in folder
, then packageDoc in publishArtifact is disabled- Add the following line inside
object Common
inproject/Common.scala
:override def settings: Seq[Def.Setting[_]] = Seq()
- Add the following line inside