diff --git a/build.sbt b/build.sbt index e1430799..b7a54460 100644 --- a/build.sbt +++ b/build.sbt @@ -13,19 +13,19 @@ ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots") ThisBuild / versionScheme := Some("early-semver") -ThisBuild / resolvers += "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" - -ThisBuild / credentials ++= Seq( - Credentials( - "GitHub Package Registry", - "maven.pkg.github.com", - scala.sys.env("GITHUB_ACTOR"), - scala.sys.env("GITHUB_TOKEN") - ) -) - -ThisBuild / publishTo := Some( - "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" +val commonPublishSettings = Seq( + credentials ++= Seq( + Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + scala.sys.env("GITHUB_ACTOR"), + scala.sys.env("GITHUB_TOKEN") + ) + ), + publishTo := Some( + "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" + ), + resolvers += "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" ) publish / skip := true @@ -63,6 +63,7 @@ lazy val core = projectMatrix "dev.zio" %%% "zio-test-sbt" % Version.zio % "test" ) ) + .settings(commonPublishSettings) .jvmPlatform( ScalaVersions, Seq( @@ -98,6 +99,7 @@ lazy val codeGen = projectMatrix "com.thesamet.scalapb" %% "compilerplugin" % scalapb.compiler.Version.scalapbVersion ) ) + .settings(commonPublishSettings) .jvmPlatform(scalaVersions = ScalaVersions) lazy val codeGenJVM212 = codeGen.jvm(Scala212) @@ -113,6 +115,7 @@ lazy val protocGenZio = protocGenProject("protoc-gen-zio", codeGenJVM212) (assembly / assemblyMergeStrategy).value.apply(x) } ) + .settings(commonPublishSettings) lazy val e2eProtos = projectMatrix