mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-27 10:33:01 +00:00
use gha packages
This commit is contained in:
parent
4619439e2c
commit
1a4c2b89da
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -15,3 +15,5 @@ jobs:
|
|||||||
cache: sbt
|
cache: sbt
|
||||||
|
|
||||||
- run: sbt 'scalafixAll --check' scalafmtCheck +test
|
- 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)
|
.dependsOn(core)
|
||||||
.withEfectMonad
|
.withEfectMonad
|
||||||
.settings(libraryDependencies += "com.htmlism" %% "rufio-zio" % "76-c565ab28")
|
.settings(libraryDependencies += "com.htmlism" %% "rufio-zio" % "76-c565ab28")
|
||||||
|
.withGitHubPackagesCredentials
|
||||||
ThisBuild / resolvers += "mcanlas/rufio" at "https://maven.pkg.github.com/mcanlas/rufio/"
|
.withResolver("rufio")
|
||||||
|
|
||||||
ThisBuild / credentials += Credentials(
|
|
||||||
"GitHub Package Registry",
|
|
||||||
"maven.pkg.github.com",
|
|
||||||
"mcanlas",
|
|
||||||
sys.env("GH_PACKAGES_TOKEN")
|
|
||||||
)
|
|
||||||
|
36
project/GitHubPackages.scala
Normal file
36
project/GitHubPackages.scala
Normal file
@ -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
Block a user