From d74a93107269ceb9490632ac5dfe0898096f561f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 13 Nov 2023 22:15:01 +0000 Subject: [PATCH 1/2] Update sbt-typelevel-ci-release, ... to 0.6.2 --- project/plugins.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f3f8cb443..7b24cfae6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,8 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.5") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") -addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.4.22") -addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.4.22") +addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.6.2") +addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.6.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") From e8be54347857022c50c00c72dc8c48ea163f82dd Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Sun, 19 Nov 2023 21:45:19 +0000 Subject: [PATCH 2/2] Update various sbt plugins --- .github/workflows/ci.yml | 142 ++++++++++++++++++++---------------- .mergify.yml | 6 +- project/build.properties | 2 +- project/plugins.sbt | 2 +- project/project/plugins.sbt | 1 - 5 files changed, 83 insertions(+), 70 deletions(-) delete mode 100644 project/project/plugins.sbt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b72900a5e..03fed1044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,55 +15,41 @@ on: tags: [v*] env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.workflow }} @ ${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build and Test strategy: matrix: os: [ubuntu-latest] - scala: [2.12.18, 2.13.12, 3.3.1] + scala: [2.12, 2.13, 3] java: [temurin@11] runs-on: ${{ matrix.os }} + timeout-minutes: 60 steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download Java (temurin@11) - id: download-java-temurin-11 - if: matrix.java == 'temurin@11' - uses: typelevel/download-java@v2 - with: - distribution: temurin - java-version: 11 - - name: Setup Java (temurin@11) + id: setup-java-temurin-11 if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: - distribution: jdkfile + distribution: temurin java-version: 11 - jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} + cache: sbt - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update - name: Start up Postgres run: docker-compose up -d @@ -94,11 +80,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p modules/weaver/target modules/scalatest/target modules/refined/target target modules/postgres/target modules/docs/target modules/log4cats/target modules/postgres-circe/target modules/h2/target modules/hikari/target modules/munit/target modules/h2-circe/target modules/core/target modules/example/target modules/specs2/target modules/free/target modules/bench/target project/target + run: mkdir -p modules/weaver/target modules/scalatest/target modules/refined/target modules/postgres/target modules/log4cats/target modules/postgres-circe/target modules/h2/target modules/hikari/target modules/munit/target modules/h2-circe/target modules/core/target modules/specs2/target modules/free/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar modules/weaver/target modules/scalatest/target modules/refined/target target modules/postgres/target modules/docs/target modules/log4cats/target modules/postgres-circe/target modules/h2/target modules/hikari/target modules/munit/target modules/h2-circe/target modules/core/target modules/example/target modules/specs2/target modules/free/target modules/bench/target project/target + run: tar cf targets.tar modules/weaver/target modules/scalatest/target modules/refined/target modules/postgres/target modules/log4cats/target modules/postgres-circe/target modules/h2/target modules/hikari/target modules/munit/target modules/h2-circe/target modules/core/target modules/specs2/target modules/free/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') @@ -118,78 +104,106 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download Java (temurin@11) - id: download-java-temurin-11 - if: matrix.java == 'temurin@11' - uses: typelevel/download-java@v2 - with: - distribution: temurin - java-version: 11 - - name: Setup Java (temurin@11) + id: setup-java-temurin-11 if: matrix.java == 'temurin@11' uses: actions/setup-java@v3 with: - distribution: jdkfile + distribution: temurin java-version: 11 - jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} + cache: sbt - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - - name: Download target directories (2.12.18) + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update + + - name: Download target directories (2.12) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18 + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12 - - name: Inflate target directories (2.12.18) + - name: Inflate target directories (2.12) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.12) + - name: Download target directories (2.13) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13 - - name: Inflate target directories (2.13.12) + - name: Inflate target directories (2.13) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.1) + - name: Download target directories (3) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.1 + name: target-${{ matrix.os }}-${{ matrix.java }}-3 - - name: Inflate target directories (3.3.1) + - name: Inflate target directories (3) run: | tar xf targets.tar rm targets.tar - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' - run: echo $PGP_SECRET | base64 -di | gpg --import + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + run: echo $PGP_SECRET | base64 -d -i - | gpg --import - name: Import signing key and strip passphrase if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} run: | - echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg + echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) - name: Publish + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} run: sbt tlCiRelease + + dependency-submission: + name: Submit Dependencies + if: github.event_name != 'pull_request' + strategy: + matrix: + os: [ubuntu-latest] + java: [temurin@11] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + cache: sbt + + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update + + - name: Submit Dependencies + uses: scalacenter/sbt-dependency-submission@v2 + with: + modules-ignore: doobie_2.12 doobie_2.13 doobie_3 docs_2.12 docs_2.13 docs_3 example_2.12 example_2.13 example_3 bench_2.12 bench_2.13 bench_3 + configs-ignore: test scala-tool scala-doc-tool test-internal diff --git a/.mergify.yml b/.mergify.yml index 0a71f4929..64791ae3b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,9 +10,9 @@ pull_request_rules: conditions: - author=scala-steward - body~=labels:.*early-semver-patch - - status-success=Build and Test (ubuntu-latest, 2.12.18, temurin@11) - - status-success=Build and Test (ubuntu-latest, 2.13.12, temurin@11) - - status-success=Build and Test (ubuntu-latest, 3.3.1, temurin@11) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@11) + - status-success=Build and Test (ubuntu-latest, 2.13, temurin@11) + - status-success=Build and Test (ubuntu-latest, 3, temurin@11) actions: merge: {} - name: Label bench PRs diff --git a/project/build.properties b/project/build.properties index 22af2628c..e8a1e246e 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.9.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index 7b24cfae6..68c599d2f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.5") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") +addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.7.0") addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.6.2") addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.6.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt deleted file mode 100644 index 400f09cd1..000000000 --- a/project/project/plugins.sbt +++ /dev/null @@ -1 +0,0 @@ -addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.2")