@zio.dev/zio-sbt 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.md +30 -6
  2. package/package.json +1 -1
package/index.md CHANGED
@@ -12,9 +12,9 @@ _ZIO SBT_ contains multiple sbt plugins that are useful for ZIO projects. It pro
12
12
  Add the following lines to your `project/plugins.sbt` file:
13
13
 
14
14
  ```scala
15
- addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.8.4")
16
- addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.4")
17
- addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.4")
15
+ addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.8.5")
16
+ addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.5")
17
+ addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.5")
18
18
  ```
19
19
 
20
20
  Then you can enable them by using the following code in your `build.sbt` file:
@@ -130,7 +130,7 @@ ZIO SBT CI plugin generates a default GitHub workflow that includes common CI ta
130
130
  To use ZIO SBT CI plugin, add the following lines to your `plugins.sbt` file:
131
131
 
132
132
  ```scala
133
- addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.4")
133
+ addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.5")
134
134
 
135
135
  resolvers ++= Resolver.sonatypeOssRepos("public")
136
136
  ```
@@ -235,6 +235,28 @@ The first time the feature generates a `release-drafter.yml`, `ciGenerateGithubW
235
235
 
236
236
  This is purely additive: it does not change `ci.yml`'s own triggers or jobs, and it does not publish the draft release automatically — a human still does that, which is what fires the existing `release: published`-gated release jobs. Because the feature defaults to *on*, a repo that already hand-maintains a `release-drafter.yml` (release-drafter's own README convention) has that file **overwritten** by the generated workflow the next time `ciGenerateGithubWorkflow` runs, exactly like `ci.yml` — silently, with no warning, so custom triggers, `runs-on` or steps are lost. `ciCheckGithubWorkflow` fails until the regenerated file is committed. The hand-edited `.github/release-drafter.yml` config file is unaffected. To keep a hand-written workflow, set `ciEnableReleaseDrafter := false`: when disabled, the plugin only deletes a `release-drafter.yml` it generated itself — identified by the "autogenerated" header every generated workflow carries — and never a hand-written one. To customize the generated workflow instead, use `ciReleaseDrafterBranch`, `ciReleaseDrafterCategories`, `ciReleaseDrafterExcludeLabels`, `ciReleaseDrafterAutolabeler` and `ciReleaseDrafterVersionResolver`.
237
237
 
238
+ ### Dependabot
239
+
240
+ `ciEnableDependabot` defaults to `true`, so `ciGenerateGithubWorkflow` also generates `.github/dependabot.yml` from `ciDependabotConfig`. The default is a single weekly `github-actions` update at the repository root, which is what the ZIO-ecosystem repos use. Add more ecosystems, directories, intervals or groups explicitly; nothing is auto-detected:
241
+
242
+ ```scala
243
+ import zio.sbt.githubactions.{DependabotConfig, DependabotGroup, DependabotUpdate}
244
+
245
+ ThisBuild / ciDependabotConfig := DependabotConfig(
246
+ Seq(
247
+ DependabotUpdate("github-actions"),
248
+ DependabotUpdate(
249
+ "npm",
250
+ directory = "/website",
251
+ openPullRequestsLimit = Some(5),
252
+ groups = Seq(DependabotGroup("docusaurus", patterns = Seq("@docusaurus/*", "react")))
253
+ )
254
+ )
255
+ )
256
+ ```
257
+
258
+ Unlike `.scala-steward.conf`, the file is fully owned by the plugin: a hand-written `dependabot.yml` is **overwritten** on the next `ciGenerateGithubWorkflow`, and `ciCheckGithubWorkflow` fails if it differs from the generated one. Set `ciEnableDependabot := false` to opt out; the plugin then deletes only a `dependabot.yml` carrying its "autogenerated" header, never a hand-written one.
259
+
238
260
  ### Scala Steward
239
261
 
240
262
  `ciEnableScalaSteward` defaults to `true`, so `ciGenerateGithubWorkflow` generates `scala-steward.yml` automatically, which runs [`scala-steward-org/scala-steward-action`](https://github.com/scala-steward-org/scala-steward-action) on a daily schedule (`ciScalaStewardSchedule`, default `"0 0 * * *"`) to open dependency-update pull requests, authenticating as a GitHub App via the `SCALA_STEWARD_GITHUB_APP_ID`, `SCALA_STEWARD_GITHUB_APP_INSTALLATION_ID` and `SCALA_STEWARD_GITHUB_APP_PRIVATE_KEY` repository secrets. Set it to `false` to opt out:
@@ -288,6 +310,8 @@ All settings are `ThisBuild`-scoped.
288
310
  | `ciScalaStewardPermissions` | `Map[String, String]` | `contents: read` | Permissions block for `scala-steward.yml`; the action authenticates via the GitHub App's installation token, not `GITHUB_TOKEN`, so no write scope is needed by default |
289
311
  | `ciScalaStewardWorkflowEnv` | `Map[String, String]` | `Map.empty` | Extra env vars for the scala-steward job |
290
312
  | `ciScalaStewardConfig` | `ScalaStewardConfig` | `ScalaStewardConfig()` | Settings scaffolded into `.scala-steward.conf` on first non-empty render |
313
+ | `ciEnableDependabot` | `Boolean` | `true` | Generates `.github/dependabot.yml`. Overwrites a hand-written one when on; when off, only deletes a copy it generated itself |
314
+ | `ciDependabotConfig` | `DependabotConfig` | one weekly `github-actions` update at `/` | Content of the generated `dependabot.yml` |
291
315
 
292
316
  **Test matrix**
293
317
 
@@ -330,7 +354,7 @@ All settings are `ThisBuild`-scoped.
330
354
 
331
355
  | Task | Description |
332
356
  | --- | --- |
333
- | `ciGenerateGithubWorkflow` | Writes `ci.yml`, `auto-approve.yml` and `auto-merge.yml`, plus `deploy-preview.yml` when `ciEnableDeployPreview` is `true` and `release-drafter.yml` (and scaffolds `.github/release-drafter.yml` once) when `ciEnableReleaseDrafter` is `true`, and scala-steward.yml (and scaffolds .scala-steward.conf once, when ciScalaStewardConfig renders non-empty content) when ciEnableScalaSteward is true |
357
+ | `ciGenerateGithubWorkflow` | Writes `ci.yml`, `auto-approve.yml` and `auto-merge.yml`, plus `deploy-preview.yml` when `ciEnableDeployPreview` is `true` and `release-drafter.yml` (and scaffolds `.github/release-drafter.yml` once) when `ciEnableReleaseDrafter` is `true`, and scala-steward.yml (and scaffolds .scala-steward.conf once, when ciScalaStewardConfig renders non-empty content) when ciEnableScalaSteward is true, and `.github/dependabot.yml` when `ciEnableDependabot` is `true` |
334
358
  | `ciCheckGithubWorkflow` | Regenerates and fails if the committed files are stale |
335
359
  | `ciGenerateAutoApproveWorkflow` | Writes `auto-approve.yml` only |
336
360
  | `ciGenerateAutoMergeWorkflow` | Writes `auto-merge.yml` only |
@@ -475,7 +499,7 @@ ZIO SBT Source is a Scala 2.13 + Scala 3 cross-compiled library that provides ut
475
499
  Add the following line to your `libraryDependencies` in `build.sbt`:
476
500
 
477
501
  ```scala
478
- libraryDependencies += "dev.zio" %% "zio-sbt-source" % "0.8.4"
502
+ libraryDependencies += "dev.zio" %% "zio-sbt-source" % "0.8.5"
479
503
  ```
480
504
 
481
505
  ### Features
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@zio.dev/zio-sbt",
3
3
  "description": "ZIO SBT Documentation",
4
4
  "license": "Apache-2.0",
5
- "version": "0.8.4",
5
+ "version": "0.8.5",
6
6
  "repository": {
7
7
  "url": "https://github.com/zio/zio-sbt"
8
8
  }