2022-06-20 17:37:41 +00:00
|
|
|
import sbt._
|
2022-12-01 13:17:33 +00:00
|
|
|
import sbt.Keys._
|
2022-06-20 17:37:41 +00:00
|
|
|
import sbtghactions._
|
|
|
|
import sbtghactions.GenerativeKeys._
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Automatically enriches projects with the following settings (despite the word "override").
|
|
|
|
*/
|
|
|
|
object GitHubActionsSettings extends AutoPlugin {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Thus plug-in will automatically be enabled; it has no requirements.
|
|
|
|
*/
|
|
|
|
override def trigger: PluginTrigger = AllRequirements
|
|
|
|
|
|
|
|
override def requires: Plugins =
|
|
|
|
GitHubActionsPlugin
|
|
|
|
|
|
|
|
override val buildSettings: Seq[Setting[_]] = Seq(
|
|
|
|
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("scalafmtCheck", "test"))),
|
2022-12-01 13:17:33 +00:00
|
|
|
githubWorkflowEnv := Map("GH_PACKAGES_TOKEN" -> "${{ secrets.GH_PACKAGES_TOKEN }}"),
|
2022-06-20 17:37:41 +00:00
|
|
|
githubWorkflowPublishTargetBranches := Nil,
|
|
|
|
githubWorkflowIncludeClean := false
|
|
|
|
)
|
|
|
|
}
|