我正在尝试为Scala v2.11&发布一个https://github.com/guardian/marley交叉版本的版本。 V2.12。所有代码依赖性都得到满足,+test
和+publishLocalSigned
都按预期工作,后者肯定会为Scala v2.11& V2.12。不幸的是,对于Scala v2.12仅使用sbt release
插件执行sbt-sonatype
上传工件 - 它不会尝试将Scala v2.11的工件上传到sonatype staging存储库。
以下是build.sbt
文件(full version in the repo on GitHub)中的相关sbt设置:
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
)
以下是sbt release
命令输出的完整副本:https://gist.github.com/rtyley/5f9f832fabe2bdcfc2d561a36c29f993 - 您可以看到即使[info] Setting scala version to 2.11.12
发生(两次) - 也只会上传Scala 2.12工件。
答案 0 :(得分:0)
我认为问题在于您的发布过程中的releaseStepCommand("publishSigned")
。
我认为:
releaseStepCommand("+publishSigned")
;或releasePublishArtifactsAction := PgpKeys.publishSigned.value
,然后切换回publishArtifacts
(而不是使用releaseStepCommand
)自述文件以releasePublishArtifactsAction
方式记录。