Skip to content

Commit

Permalink
Publish Maven Repo in build.sbt to GitHub package repo
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsmith-eu authored Jul 26, 2023
1 parent 08a7bc9 commit 13664fc
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion data-quality-profiler/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,32 @@ assembly / assemblyMergeStrategy := {
case _ => MergeStrategy.first
}

// these are all to allow local publishing to overwrite the version
/** make a fat jar */
artifact in (Compile, assembly) := {
val art = (artifact in (Compile, assembly)).value
art.withClassifier(Some("assembly"))
}
addArtifact(artifact in (Compile, assembly), assembly)
/***/


publishTo := Some(s"GitHub Apache Maven Packages" at s"https://maven.pkg.github.com/${System.getenv("GITHUB_REPOSITORY")}")
credentials += Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
System.getenv("GITHUB_REPOSITORY_OWNER"),
System.getenv("GITHUB_TOKEN")
)
publishMavenStyle := true
isSnapshot := true

// these are all to allow local publishing to overwrite the version
publishConfiguration := publishConfiguration.value.withOverwrite(true)
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
isSnapshot := true

Test / publishArtifact := false


Compile / compile / wartremoverErrors ++= Seq(Wart.IterableOps, Wart.Throw, Wart.Null, Wart.Var, Wart.Return, Wart.OptionPartial, Wart.Any)
Compile / compile / wartremoverExcluded += (LocalRootProject / baseDirectory).value / "src" / "test"
Expand Down

0 comments on commit 13664fc

Please sign in to comment.