I'm trying to release a version of https://github.com/guardian/marley cross-built for Scala v2.11 & v2.12. All code dependencies are satisfied, and both +test
and +publishLocalSigned
work as expected, the latter definitely producing artifacts for Scala v2.11 & v2.12. Unfortunately, executing sbt release
with the sbt-sonatype
plugin only uploads artifacts for Scala v2.12 - it makes no attempt to upload artifacts for Scala v2.11 to the sonatype staging repository.
Here are the relevant sbt settings from the build.sbt
file (full version in the repo on GitHub):
scalaVersion in ThisBuild := "2.12.4"
crossScalaVersions in ThisBuild := Seq(scalaVersion.value, "2.11.12")
import ReleaseTransformations._
releaseCrossBuild := true // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
Here's a full copy of the sbt release
command output: https://gist.github.com/rtyley/5f9f832fabe2bdcfc2d561a36c29f993 - you can see that even though [info] Setting scala version to 2.11.12
occurs (twice) - only Scala 2.12 artifacts are uploaded.
I think the issue is the
releaseStepCommand("publishSigned")
in your release process.I think either:
releaseStepCommand("+publishSigned")
; orreleasePublishArtifactsAction := PgpKeys.publishSigned.value
, and switch back topublishArtifacts
(instead of usingreleaseStepCommand
)The README documents the
releasePublishArtifactsAction
way.