11import Dependencies ._
22
33ThisBuild / scalaVersion := " 2.13.15"
4- ThisBuild / version := " 0.0.10 "
4+ ThisBuild / version := " 0.0.11 "
55ThisBuild / versionScheme := Some (" early-semver" )
66ThisBuild / organization := " io.citrine"
77ThisBuild / organizationName := " Citrine Informatics"
@@ -11,6 +11,21 @@ ThisBuild / artifactClassifier := Some(osNameClassifier + "_" + osArchitecture)
1111lazy val osNameClassifier = System .getProperty(" os.name" ).replace(' ' , '_' ).trim
1212lazy val osArchitecture = System .getProperty(" os.arch" ).replace(' ' , '_' ).trim
1313
14+ ThisBuild / credentials += Credentials (
15+ " GitHub Package Registry" ,
16+ " maven.pkg.github.com" ,
17+ sys.env.getOrElse(" GITHUB_ACTOR" , " " ),
18+ sys.env.getOrElse(" GITHUB_TOKEN" , " " )
19+ )
20+
21+ lazy val githubRepository = " GitHub Package Registry" at s " https://maven.pkg.github.com/CitrineInformatics/ecos-java-scala "
22+ lazy val nexusRepository = " Citrine Nexus" at " https://nexus.corp.citrine.io/repository/citrine/"
23+
24+ lazy val publishTarget = sys.env.get(" PUBLISH_TO_GITHUB" ) match {
25+ case Some (" true" ) => Some (githubRepository)
26+ case _ => Some (nexusRepository)
27+ }
28+
1429lazy val commonSettings = Seq (
1530 javah / target := sourceDirectory.value / " native" / " include" ,
1631 crossPaths := true ,
@@ -19,7 +34,7 @@ lazy val commonSettings = Seq(
1934 if (isSnapshot.value) {
2035 None
2136 } else {
22- Some ( " Citrine Nexus " at " https://nexus.corp.citrine.io/repository/citrine/ " )
37+ publishTarget
2338 }
2439 },
2540 publishConfiguration := publishConfiguration.value.withOverwrite(true )
0 commit comments