我正在尝试发布https://github.com/guardian/marley cross-built的版本。v2.12。满足所有代码依赖性,并且+test
和+publishLocalSigned
都按预期工作,后者肯定会为Scala v2.11&v2.12。不幸的是,仅使用sbt-sonatype
插件执行sbt release
上传 scala v2.12的伪像 - 它没有尝试将Scala v2.11上传伪像v2.11上传到Sonatype登台存储库中。
这是build.sbt
文件的相关SBT设置(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
)
这是sbt release
命令输出的完整副本:https://gist.github.com/rtyley/5f9f832fbabe2bdcfc2d561a361a36c29993-即使[info] Setting scala version to 2.11.12
出现(tw t t t t t t t t t t t t t t t t t t t t t t t t t t t t t t the( - scala 2.12 artifcats art toperd artplotic in。
我认为问题是您发行过程中的releaseStepCommand("publishSigned")
。
我认为:
- 需要是
releaseStepCommand("+publishSigned")
;或 - 您需要设置
releasePublishArtifactsAction := PgpKeys.publishSigned.value
,然后切换回publishArtifacts
(而不是使用releaseStepCommand
(
readme记录了releasePublishArtifactsAction
方法。