Skip to content

Commit 13664fc

Browse files
Publish Maven Repo in build.sbt to GitHub package repo
1 parent 08a7bc9 commit 13664fc

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

data-quality-profiler/build.sbt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,32 @@ assembly / assemblyMergeStrategy := {
7171
case _ => MergeStrategy.first
7272
}
7373

74+
// these are all to allow local publishing to overwrite the version
75+
/** make a fat jar */
76+
artifact in (Compile, assembly) := {
77+
val art = (artifact in (Compile, assembly)).value
78+
art.withClassifier(Some("assembly"))
79+
}
80+
addArtifact(artifact in (Compile, assembly), assembly)
81+
/***/
82+
83+
84+
publishTo := Some(s"GitHub Apache Maven Packages" at s"https://maven.pkg.github.com/${System.getenv("GITHUB_REPOSITORY")}")
85+
credentials += Credentials(
86+
"GitHub Package Registry",
87+
"maven.pkg.github.com",
88+
System.getenv("GITHUB_REPOSITORY_OWNER"),
89+
System.getenv("GITHUB_TOKEN")
90+
)
91+
publishMavenStyle := true
92+
isSnapshot := true
93+
7494
// these are all to allow local publishing to overwrite the version
7595
publishConfiguration := publishConfiguration.value.withOverwrite(true)
7696
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
77-
isSnapshot := true
97+
98+
Test / publishArtifact := false
99+
78100

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

0 commit comments

Comments
 (0)