From 940d6bb09e6444b983499ac1dd457b24fdbf83fd Mon Sep 17 00:00:00 2001 From: Russ White <356303+russwyte@users.noreply.github.com> Date: Mon, 5 Oct 2026 14:48:07 -0500 Subject: [PATCH] Bump sbt-zipx to 0.18.0 Replace the 0.17.0-SNAPSHOT pin with the 0.18.0 release and regenerate workflows. ascent-js and ascent-css move from 0.7.1 to 0.7.4 so docs/update satisfies the zipx catalog check: ascent-dom-core needs ascent-css 0.7.4. --- .github/actions/zipx-sbt-setup/action.yml | 34 ++++++++++++++++--- .github/workflows/ci.yml | 38 ++++++++++++++++++---- .github/workflows/zipx-release.yml | 31 ++++++++++++++++-- .github/workflows/zipx-version-updates.yml | 2 ++ project/ZipxVersions.scala | 2 +- project/plugins.sbt | 4 +-- project/zipx-ci.env | 1 + 7 files changed, 95 insertions(+), 17 deletions(-) diff --git a/.github/actions/zipx-sbt-setup/action.yml b/.github/actions/zipx-sbt-setup/action.yml index 6708935..de700f9 100644 --- a/.github/actions/zipx-sbt-setup/action.yml +++ b/.github/actions/zipx-sbt-setup/action.yml @@ -23,6 +23,10 @@ inputs: description: "LocalDir sbt cache: save (restore, then save this job's build snapshot), restore (restore only), or off" required: false default: restore + purge: + description: When true, skip LocalDir restore. A save owner still saves a fresh snapshot; a restore job does nothing + required: false + default: "false" cache-epoch: description: Fixed cache epoch; when non-empty skips git-tag resolve and keys the cache with this value required: false @@ -54,7 +58,7 @@ runs: node-version: ${{ inputs.node-version }} - name: Resolve cache epoch id: cache-epoch - if: inputs.cache-mode != 'off' && inputs.cache-epoch == '' + if: inputs.cache-epoch == '' && inputs.cache-mode != 'off' && (inputs.cache-mode == 'save' || inputs.purge != 'true') run: | set -euo pipefail tag_match='v*' @@ -81,7 +85,7 @@ runs: shell: bash - name: Cache sbt - if: inputs.cache-mode == 'save' && inputs.cache-epoch == '' + if: inputs.cache-mode == 'save' && inputs.purge != 'true' && inputs.cache-epoch == '' uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | @@ -96,7 +100,7 @@ runs: ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ steps.cache-epoch.outputs.release }}-build- ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt- - name: Cache sbt - if: inputs.cache-mode == 'save' && inputs.cache-epoch != '' + if: inputs.cache-mode == 'save' && inputs.purge != 'true' && inputs.cache-epoch != '' uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | @@ -109,8 +113,28 @@ runs: ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ inputs.cache-epoch }}-build-${{ github.run_id }}- ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ inputs.cache-epoch }}-build- ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt- + - name: Save sbt cache + if: inputs.cache-mode == 'save' && inputs.purge == 'true' && inputs.cache-epoch == '' + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/.sbt + ~/.cache/sbt + ~/.cache/coursier + target + key: ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ steps.cache-epoch.outputs.epoch }}-build-${{ github.run_id }}-${{ inputs.cache-key-suffix }} + - name: Save sbt cache + if: inputs.cache-mode == 'save' && inputs.purge == 'true' && inputs.cache-epoch != '' + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/.sbt + ~/.cache/sbt + ~/.cache/coursier + target + key: ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ inputs.cache-epoch }}-build-${{ github.run_id }}-${{ inputs.cache-key-suffix }} - name: Restore sbt cache - if: inputs.cache-mode == 'restore' && inputs.cache-epoch == '' + if: inputs.cache-mode == 'restore' && inputs.purge != 'true' && inputs.cache-epoch == '' uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | @@ -125,7 +149,7 @@ runs: ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt-${{ steps.cache-epoch.outputs.release }}-build- ${{ inputs.runner-os }}-jdk${{ inputs.java-version }}-sbt- - name: Restore sbt cache - if: inputs.cache-mode == 'restore' && inputs.cache-epoch != '' + if: inputs.cache-mode == 'restore' && inputs.purge != 'true' && inputs.cache-epoch != '' uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64316eb..1aac6a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: save + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: cache-rehydrate run: sbt 'Test/compile' @@ -105,9 +106,8 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: save + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - - name: Pinned snapshots - run: echo "::warning title=zipx snapshots::pinned snapshots (rocks.earlyeffect:sbt-zipx:0.17.0-SNAPSHOT)" - name: test run: | if [ "$ZIPX_VERIFY_CLEAN_FULL" = "true" ]; then @@ -140,6 +140,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: fmt run: | @@ -173,6 +174,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: workflow-check run: | @@ -206,6 +208,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: advisories run: | @@ -243,6 +246,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: Fetch PR base SHA run: git fetch --no-tags origin "$ZIPX_MODVER_BASE_SHA" @@ -281,6 +285,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: Fetch PR base SHA run: git fetch --no-tags origin "$ZIPX_MODVER_BASE_SHA" @@ -316,6 +321,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: test-js run: | @@ -349,6 +355,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: Install Scala Native build dependencies run: sudo apt-get update && sudo apt-get install -y clang libstdc++-12-dev libgc-dev libunwind-dev libssl-dev @@ -361,13 +368,30 @@ jobs: fi env: ZIPX_VERIFY_CLEAN_FULL: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'clean') }} + verify: + name: verify + runs-on: ubuntu-latest + needs: + - advisories + - fmt + - modver-check + - modver-suggest + - test + - test-js + - test-native + - workflow-check + if: "!cancelled()" + steps: + - name: Fail when a Verify job failed or was cancelled + if: (needs.advisories.result == 'failure' || needs.advisories.result == 'cancelled') || (needs.fmt.result == 'failure' || needs.fmt.result == 'cancelled') || (needs.modver-check.result == 'failure' || needs.modver-check.result == 'cancelled') || (needs.modver-suggest.result == 'failure' || needs.modver-suggest.result == 'cancelled') || (needs.test.result == 'failure' || needs.test.result == 'cancelled') || (needs.test-js.result == 'failure' || needs.test-js.result == 'cancelled') || (needs.test-native.result == 'failure' || needs.test-native.result == 'cancelled') || (needs.workflow-check.result == 'failure' || needs.workflow-check.result == 'cancelled') + run: exit 1 snapshots: name: snapshots runs-on: ubuntu-latest needs: - cache-rehydrate - - test - if: ((!cancelled() && needs.cache-rehydrate.result != 'failure' && needs.test.result != 'failure') && ((((github.event_name == 'push') && ((github.ref == 'refs/heads/main'))) || (github.event_name == 'workflow_dispatch')))) && (github.repository == 'early-effect/hexis') + - verify + if: ((!cancelled() && needs.cache-rehydrate.result != 'failure' && needs.verify.result != 'failure') && ((((github.event_name == 'push') && ((github.ref == 'refs/heads/main'))) || (github.event_name == 'workflow_dispatch')))) && (github.repository == 'early-effect/hexis') env: COURSIER_TTL: "0s" JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 @@ -387,6 +411,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: snapshots run: sbt 'zipxSnapshotPublish' @@ -395,8 +420,8 @@ jobs: runs-on: ubuntu-latest needs: - cache-rehydrate - - test - if: (!cancelled() && needs.cache-rehydrate.result != 'failure' && needs.test.result != 'failure') && (((github.event_name == 'pull_request') && (contains(github.event.pull_request.labels.*.name, 'snapshots'))) && (github.event.pull_request.head.repo.full_name == github.repository)) + - verify + if: (!cancelled() && needs.cache-rehydrate.result != 'failure' && needs.verify.result != 'failure') && (((github.event_name == 'pull_request') && (contains(github.event.pull_request.labels.*.name, 'snapshots'))) && (github.event.pull_request.head.repo.full_name == github.repository)) env: COURSIER_TTL: "0s" JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 @@ -416,6 +441,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: snapshots-pr run: sbt 'zipxSnapshotPublish pr' diff --git a/.github/workflows/zipx-release.yml b/.github/workflows/zipx-release.yml index e02f102..2f26d93 100644 --- a/.github/workflows/zipx-release.yml +++ b/.github/workflows/zipx-release.yml @@ -13,6 +13,7 @@ name: zipx release default: all permissions: contents: write + pull-requests: write concurrency: group: zipx-release cancel-in-progress: false @@ -43,6 +44,7 @@ jobs: node-version: "" sbt-disk-cache: "false" cache-mode: restore + purge: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'purge') }} cache-epoch: fe7dc0ac41a3d683 - name: Tag is on the default branch if: github.event_name == 'push' @@ -90,9 +92,34 @@ jobs: run: | set -euo pipefail echo "## Open the next snapshot" >> "$GITHUB_STEP_SUMMARY" - echo "These rows are released. Further snapshots of them publish nothing until the catalog moves." >> "$GITHUB_STEP_SUMMARY" + echo "After the deployment, that line hides further snapshots of it. Run sbt zipxModverBump and merge it so the next line opens." >> "$GITHUB_STEP_SUMMARY" cat target/zipx-release-tags.txt >> "$GITHUB_STEP_SUMMARY" - echo "On this commit: sbt zipxModverBump" >> "$GITHUB_STEP_SUMMARY" + - name: Open the bump pull request + run: | + set -euo pipefail + sbt zipxModverBump + if [ -z "$(git status --porcelain)" ]; then + echo "No released row to bump." + exit 0 + fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git checkout -B "zipx/modver-bump-${GITHUB_RUN_ID}" + git add --all -- . ":!.github/workflows" + if [ -z "$(git diff --cached --name-only)" ]; then + echo "No released row to bump." + exit 0 + fi + git commit -m "Open the next snapshot line." + git push -u origin HEAD + gh label create clean --force --description "zipx: Verify runs cleanFull" || true + cat > /tmp/zipx-pr-body.md <<'EOF' + The release tag stays on the release commit. This branch opens the next catalog line with sbt zipxModverBump. + EOF + gh pr create --title "Open the next snapshot line" --body-file /tmp/zipx-pr-body.md --head "zipx/modver-bump-${GITHUB_RUN_ID}" --label clean || true + + env: + GH_TOKEN: ${{ github.token }} docs: name: docs needs: diff --git a/.github/workflows/zipx-version-updates.yml b/.github/workflows/zipx-version-updates.yml index 2cac6ad..b4dfd1c 100644 --- a/.github/workflows/zipx-version-updates.yml +++ b/.github/workflows/zipx-version-updates.yml @@ -13,6 +13,7 @@ jobs: name: Catalog version updates runs-on: ubuntu-latest env: + COURSIER_TTL: "0s" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Detect GitHub App credentials @@ -78,6 +79,7 @@ jobs: cs launch --ttl Inf --repository m2Local --repository ivy2Local --repository central "rocks.earlyeffect:zipx-cli_3:$ZIPX_CLI_VERSION" -- catalog update --yes --verify-load sbt "zipxPinUpdate yes" sbt zipxCatalogGenerate + sbt zipxSnapshotAdvance - name: Open update PR run: | diff --git a/project/ZipxVersions.scala b/project/ZipxVersions.scala index 1b11eb1..5394012 100644 --- a/project/ZipxVersions.scala +++ b/project/ZipxVersions.scala @@ -24,7 +24,7 @@ object MyVersions extends ZipxVersions: val specular = Lib("rocks.earlyeffect", "specular-core", "0.17.0") val specularZioTest = specular.mod("specular-zio-test").test val specularTheme = specular.mod("early-effect-docs-theme").test - val ascentJs = Lib("rocks.earlyeffect", "ascent-js", "0.7.1") + val ascentJs = Lib("rocks.earlyeffect", "ascent-js", "0.7.4") val ascentCss = ascentJs.mod("ascent-css") val scalafmt = Plugin("org.scalameta", "sbt-scalafmt", "2.6.2") diff --git a/project/plugins.sbt b/project/plugins.sbt index 586a790..be11db6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,5 @@ // Generated by zipx. Do not edit. Run 'sbt zipxWorkflowGenerate' to regenerate. -resolvers += "central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/" -forceUpdatePeriod := Some(scala.concurrent.duration.Duration.Zero) -addSbtPlugin("rocks.earlyeffect" % "sbt-zipx" % "0.17.0-SNAPSHOT") +addSbtPlugin("rocks.earlyeffect" % "sbt-zipx" % "0.18.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.22.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.12") diff --git a/project/zipx-ci.env b/project/zipx-ci.env index 01719ab..9182a33 100644 --- a/project/zipx-ci.env +++ b/project/zipx-ci.env @@ -1,3 +1,4 @@ # Generated by zipx. Do not edit. Run 'sbt zipxWorkflowGenerate' to regenerate. ZIPX_JAVA_VERSION=25 ZIPX_RUNNER_OS=ubuntu-latest +ZIPX_CLI_VERSION=0.18.0