diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4019fa..949e2fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,47 +23,39 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.11, 3.3.0] - java: [temurin@11] + scala: [2.13.16, 3.3.5] + java: [temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Java (temurin@11) - if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 + cache: sbt - - name: Cache sbt - uses: actions/cache@v2 - 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: Setup sbt + uses: sbt/setup-sbt@v1 - - run: sbt ++${{ matrix.scala }} mdoc + - run: sbt '++ ${{ matrix.scala }}' mdoc - name: Check that workflows are up to date - run: sbt ++${{ matrix.scala }} githubWorkflowCheck + run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - name: Build project - run: sbt ++${{ matrix.scala }} test + run: sbt '++ ${{ matrix.scala }}' test - name: Compress target directories run: tar cf targets.tar target modules/http4s-cloud-functions/target project-docs/target project/target - name: Upload target directories - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} path: targets.tar @@ -75,50 +67,42 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.3.0] - java: [temurin@11] + scala: [3.3.5] + java: [temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Java (temurin@11) - if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 + cache: sbt - - name: Cache sbt - uses: actions/cache@v2 - 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.13.11) - uses: actions/download-artifact@v2 + - name: Setup sbt + uses: sbt/setup-sbt@v1 + + - name: Download target directories (2.13.16) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.13.11-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.16-${{ matrix.java }} - - name: Inflate target directories (2.13.11) + - name: Inflate target directories (2.13.16) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.0) - uses: actions/download-artifact@v2 + - name: Download target directories (3.3.5) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-3.3.0-${{ matrix.java }} + name: target-${{ matrix.os }}-3.3.5-${{ matrix.java }} - - name: Inflate target directories (3.3.0) + - name: Inflate target directories (3.3.5) run: | tar xf targets.tar rm targets.tar @@ -128,4 +112,4 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbt ++${{ matrix.scala }} ci-release + run: sbt ci-release diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 547aaa4..bfc865d 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -17,6 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Delete artifacts + shell: bash {0} run: | # Customize those three lines with your repository and credentials: REPO=${GITHUB_API_URL}/repos/${{ github.repository }} @@ -25,7 +26,7 @@ jobs: ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } # A temporary file which receives HTTP response headers. - TMPFILE=/tmp/tmp.$$ + TMPFILE=$(mktemp) # An associative array, key: artifact name, value: number of artifacts of that name. declare -A ARTCOUNT diff --git a/project/GithubActions.scala b/project/GithubActions.scala index 97ef241..91969f7 100644 --- a/project/GithubActions.scala +++ b/project/GithubActions.scala @@ -13,6 +13,7 @@ object GithubActions extends AutoPlugin { override def buildSettings: Seq[Def.Setting[_]] = Seq( + githubWorkflowJavaVersions := Seq(JavaSpec.temurin("21")), githubWorkflowTargetTags ++= Seq("v*"), githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))), diff --git a/project/Versions.scala b/project/Versions.scala index f03625e..45127ee 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,17 +1,18 @@ object Versions { object scala { - val scala2_13 = "2.13.11" - val scala3 = "3.3.0" + val scala2_13 = "2.13.16" + val scala3 = "3.3.5" val cross = Seq(scala2_13, scala3) val default = scala3 } - val http4s = "0.23.22" + val http4s = "0.23.30" - val cloudFunctions = "1.1.0" + + val cloudFunctions = "1.1.4" def V = this diff --git a/project/build.properties b/project/build.properties index 10fd9ee..e97b272 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.5 +sbt.version=1.10.10 diff --git a/project/plugins.sbt b/project/plugins.sbt index b8078b7..9eec80f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,8 @@ addDependencyTreePlugin -addSbtPlugin("org.jmotor.sbt" % "sbt-dependency-updates" % "1.2.7") +addSbtPlugin("org.jmotor.sbt" % "sbt-dependency-updates" % "1.2.9") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.3") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2")