@zio.dev/zio-sbt 0.8.2 → 0.8.4
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.
- package/index.md +11 -11
- 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.
|
|
16
|
-
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.
|
|
17
|
-
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.8.
|
|
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")
|
|
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.
|
|
133
|
+
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.8.4")
|
|
134
134
|
|
|
135
135
|
resolvers ++= Resolver.sonatypeOssRepos("public")
|
|
136
136
|
```
|
|
@@ -168,7 +168,7 @@ Note that the plugin declares `trigger = allRequirements`, so having it on the c
|
|
|
168
168
|
|
|
169
169
|
### Auto-Approving and Auto-Merging Dependency Update PRs
|
|
170
170
|
|
|
171
|
-
Besides `ci.yml`, the `ciGenerateGithubWorkflow` task also generates two more workflow files: `auto-approve.yml` and `auto-merge.yml`. These workflows automatically approve and
|
|
171
|
+
Besides `ci.yml`, the `ciGenerateGithubWorkflow` task also generates two more workflow files: `auto-approve.yml` and `auto-merge.yml`. These workflows automatically approve, and squash-merge once CI is green, pull requests opened by dependency-update bots, such as [Scala Steward](https://github.com/scala-steward-org/scala-steward), [Dependabot](https://github.com/dependabot), and [Renovate](https://github.com/renovatebot/renovate).
|
|
172
172
|
|
|
173
173
|
Both workflows trigger on `pull_request_target` and also support `workflow_dispatch`, which backfills the approval/auto-merge on every currently open PR from the configured bots—handy for recovering PRs that were opened before the workflow existed, or after a workflow bug is fixed.
|
|
174
174
|
|
|
@@ -194,7 +194,7 @@ The default value mirrors the bots used by the `zio/zio` repository: `Seq(Depend
|
|
|
194
194
|
|
|
195
195
|
> **Note:**
|
|
196
196
|
>
|
|
197
|
-
>
|
|
197
|
+
> `auto-merge.yml` waits for every check on the PR (other than its own bot jobs) to finish and merges with `gh pr merge --squash` only if none failed, so it is safe on branches without required status checks. A red check fails the job and leaves the PR open. The `workflow_dispatch` backfill still uses `gh pr merge --auto`, which merges immediately on a branch with no required status checks, so configure branch protection with required checks before relying on it.
|
|
198
198
|
|
|
199
199
|
> **Note:**
|
|
200
200
|
>
|
|
@@ -233,7 +233,7 @@ The first time the feature generates a `release-drafter.yml`, `ciGenerateGithubW
|
|
|
233
233
|
|
|
234
234
|
`release-drafter.yml`'s `push` trigger runs on `ciReleaseDrafterBranch` when set, otherwise the first entry of `ciEnabledBranches`, otherwise `main` — GitHub Actions' static `on.push.branches` list can't use the same `default_branch` runtime expression this plugin uses elsewhere, so a literal branch name is always required. Repos maintaining multiple release series (e.g. `series/2.x`) should set `ciReleaseDrafterBranch` explicitly.
|
|
235
235
|
|
|
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*, `release-drafter.yml`
|
|
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
238
|
### Scala Steward
|
|
239
239
|
|
|
@@ -247,7 +247,7 @@ ThisBuild / ciEnableScalaSteward := false
|
|
|
247
247
|
|
|
248
248
|
The first time this feature renders a non-empty `.scala-steward.conf` from `ciScalaStewardConfig`, it scaffolds that file at the repository root, if it does not already exist. Like `.github/release-drafter.yml`, it is **never rewritten or deleted afterward**, even if `ciScalaStewardConfig` changes or `ciEnableScalaSteward` is turned back off — repo-specific pins/ignores/grouping are meant to be hand-customized once scaffolded, and `ciCheckGithubWorkflow`'s drift check does not cover it either, only `.github/workflows/scala-steward.yml` does. An all-default `ciScalaStewardConfig` renders to nothing, so most repos never see this file at all unless they set it.
|
|
249
249
|
|
|
250
|
-
This is purely additive: it does not change `ci.yml`'s own triggers or jobs. Because the feature defaults to *on*, `scala-steward.yml`
|
|
250
|
+
This is purely additive: it does not change `ci.yml`'s own triggers or jobs. Because the feature defaults to *on*, a repo that already hand-maintains a `scala-steward.yml` (as every ZIO-ecosystem repo currently does) has that file **overwritten** by the generated workflow the next time `ciGenerateGithubWorkflow` runs, exactly like `ci.yml` — silently, with no warning — and `ciCheckGithubWorkflow` fails until the regenerated file is committed. The hand-edited `.scala-steward.conf` is unaffected. To keep a hand-written workflow, set `ciEnableScalaSteward := false`: when disabled, the plugin only deletes a `scala-steward.yml` it generated itself — identified by its "autogenerated" header — and never a hand-written one. To customize the generated workflow instead, use `ciScalaStewardSchedule`, `ciScalaStewardTimeoutMinutes`, `ciScalaStewardPermissions`, `ciScalaStewardWorkflowEnv` and `ciScalaStewardConfig`.
|
|
251
251
|
|
|
252
252
|
### Keeping the Workflow in Sync
|
|
253
253
|
|
|
@@ -276,13 +276,13 @@ All settings are `ThisBuild`-scoped.
|
|
|
276
276
|
| `ciSwapSizeGB` | `Int` | `0` | Adds a swap-space step to every job when greater than zero |
|
|
277
277
|
| `ciBackgroundJobs` | `Seq[String]` | `Seq.empty` | Commands prefixed to each `run`, for daemons a job needs |
|
|
278
278
|
| `ciEnableDeployPreview` | `Boolean` | `false` | Adds website-artifact upload steps to `build` and generates `deploy-preview.yml`. Requires `NETLIFY_AUTH_TOKEN`/`NETLIFY_SITE_ID` secrets |
|
|
279
|
-
| `ciEnableReleaseDrafter` | `Boolean` | `true` | Generates `release-drafter.yml` and scaffolds `.github/release-drafter.yml` (once).
|
|
279
|
+
| `ciEnableReleaseDrafter` | `Boolean` | `true` | Generates `release-drafter.yml` and scaffolds `.github/release-drafter.yml` (once). Overwrites a hand-written `release-drafter.yml` when on; when off, only deletes a copy it generated itself |
|
|
280
280
|
| `ciReleaseDrafterCategories` | `Seq[ReleaseDrafterCategory]` | Features/Bug Fixes/Maintenance/Dependency Updates | Categories written into the scaffolded config on first generation only |
|
|
281
281
|
| `ciReleaseDrafterVersionResolver` | `Option[ReleaseDrafterVersionResolver]` | `None` | Optional `version-resolver` block for the scaffolded config |
|
|
282
282
|
| `ciReleaseDrafterAutolabeler` | `Seq[ReleaseDrafterAutolabelerRule]` | `Seq.empty` | Optional `autolabeler` rules for the scaffolded config |
|
|
283
283
|
| `ciReleaseDrafterExcludeLabels` | `Seq[String]` | `Seq("skip-changelog")` | `exclude-labels` for the scaffolded config |
|
|
284
284
|
| `ciReleaseDrafterBranch` | `Option[Branch]` | `None` | Branch `release-drafter.yml`'s `push` trigger runs on. Falls back to the first of `ciEnabledBranches`, then `"main"` |
|
|
285
|
-
| `ciEnableScalaSteward` | `Boolean` | `true` | Generates `scala-steward.yml` and scaffolds `.scala-steward.conf` (once, only if non-empty).
|
|
285
|
+
| `ciEnableScalaSteward` | `Boolean` | `true` | Generates `scala-steward.yml` and scaffolds `.scala-steward.conf` (once, only if non-empty). Overwrites a hand-written `scala-steward.yml` when on; when off, only deletes a copy it generated itself |
|
|
286
286
|
| `ciScalaStewardSchedule` | `String` | `"0 0 * * *"` | Cron schedule for `scala-steward.yml`'s `schedule` trigger |
|
|
287
287
|
| `ciScalaStewardTimeoutMinutes` | `Int` | `45` | `timeout-minutes` for the scala-steward job |
|
|
288
288
|
| `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 |
|
|
@@ -475,7 +475,7 @@ ZIO SBT Source is a Scala 2.13 + Scala 3 cross-compiled library that provides ut
|
|
|
475
475
|
Add the following line to your `libraryDependencies` in `build.sbt`:
|
|
476
476
|
|
|
477
477
|
```scala
|
|
478
|
-
libraryDependencies += "dev.zio" %% "zio-sbt-source" % "0.8.
|
|
478
|
+
libraryDependencies += "dev.zio" %% "zio-sbt-source" % "0.8.4"
|
|
479
479
|
```
|
|
480
480
|
|
|
481
481
|
### Features
|