Skip to content

Commit

Permalink
Updated sbt-github-actions and corrected a few setting defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Jan 18, 2021
1 parent e4d98cf commit 5077e76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Once this is done, decide whether you would like snapshots to be published on ev
ThisBuild / spiewakCiReleaseSnapshots := true
```

Also optionally, you can override the name of the primary branch. By default, `SonatypeCiReleasePlugin` assumes the primary branch is named `master`. If you have renamed your primary branch, make sure to reconfigure the value:
If you do set the above to `true`, you should probably also make sure to set your primary branch as below:

```sbt
ThisBuild / spiewakMainBranches := Seq("main")
Expand Down
2 changes: 1 addition & 1 deletion core/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.0")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import sbtghactions.GenerativePlugin.autoImport._
object SonatypeCiReleasePlugin extends AutoPlugin {

object autoImport {
lazy val spiewakCiReleaseSnapshots = settingKey[Boolean]("Controls whether or not snapshots should be released on master (default: false)")
lazy val spiewakMainBranches = settingKey[Seq[String]]("The primary branch(es) for your repository (default: [master])")
lazy val spiewakCiReleaseSnapshots = settingKey[Boolean]("Controls whether or not snapshots should be released on main (default: false)")
lazy val spiewakMainBranches = settingKey[Seq[String]]("The primary branch(es) for your repository (default: [])")
}

import autoImport._
Expand All @@ -34,7 +34,8 @@ object SonatypeCiReleasePlugin extends AutoPlugin {
override def trigger = noTrigger

override def globalSettings = Seq(
spiewakCiReleaseSnapshots := false)
spiewakCiReleaseSnapshots := false,
spiewakMainBranches := Seq())

override def buildSettings = Seq(
githubWorkflowEnv ++= Map(
Expand Down

0 comments on commit 5077e76

Please sign in to comment.