use gha packages
This commit is contained in:
parent
4619439e2c
commit
1a4c2b89da
|
@ -15,3 +15,5 @@ jobs:
|
|||
cache: sbt
|
||||
|
||||
- run: sbt 'scalafixAll --check' scalafmtCheck +test
|
||||
env:
|
||||
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
|
||||
|
|
11
build.sbt
11
build.sbt
|
@ -18,12 +18,5 @@ lazy val demo =
|
|||
.dependsOn(core)
|
||||
.withEfectMonad
|
||||
.settings(libraryDependencies += "com.htmlism" %% "rufio-zio" % "76-c565ab28")
|
||||
|
||||
ThisBuild / resolvers += "mcanlas/rufio" at "https://maven.pkg.github.com/mcanlas/rufio/"
|
||||
|
||||
ThisBuild / credentials += Credentials(
|
||||
"GitHub Package Registry",
|
||||
"maven.pkg.github.com",
|
||||
"mcanlas",
|
||||
sys.env("GH_PACKAGES_TOKEN")
|
||||
)
|
||||
.withGitHubPackagesCredentials
|
||||
.withResolver("rufio")
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
import sbt._
|
||||
import sbt.Keys._
|
||||
|
||||
/**
|
||||
* Automatically enriches projects with the following settings (despite the word "override").
|
||||
*/
|
||||
object GitHubPackages extends AutoPlugin {
|
||||
|
||||
/**
|
||||
* Thus plug-in will automatically be enabled; it has no requirements.
|
||||
*/
|
||||
override def trigger: PluginTrigger = AllRequirements
|
||||
|
||||
val autoImport = ThingsToAutoImport
|
||||
|
||||
object ThingsToAutoImport {
|
||||
implicit class PackagesOps(p: Project) {
|
||||
def withGitHubPackagesCredentials: Project =
|
||||
p
|
||||
.settings(
|
||||
credentials += Credentials(
|
||||
"GitHub Package Registry",
|
||||
"maven.pkg.github.com",
|
||||
"mcanlas",
|
||||
sys.env("GH_PACKAGES_TOKEN")
|
||||
)
|
||||
)
|
||||
|
||||
def withResolver(project: String): Project =
|
||||
p
|
||||
.settings(
|
||||
resolvers += s"mcanlas/$project" at s"https://maven.pkg.github.com/mcanlas/$project/"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue