From fb79f2efcfb903b20b87ba4ca91bddfa3b8273c6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 00:47:28 +0000 Subject: [PATCH 01/11] Migrate to sbt-typelevel --- .github/workflows/ci.yml | 62 +++++++++++++++++++++++++------------ .github/workflows/clean.yml | 2 +- build.sbt | 53 ++++++------------------------- project/plugins.sbt | 7 +---- 4 files changed, 53 insertions(+), 71 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cd4b1ab..3fd096d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,13 @@ on: branches: ['**'] push: branches: ['**'] + tags: [v*] env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: @@ -23,7 +28,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.15, 2.13.6] - java: [adopt@1.8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -31,10 +36,12 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v12 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 8 - name: Cache sbt uses: actions/cache@v2 @@ -49,33 +56,39 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Check that workflows are up to date - run: sbt --client '++${{ matrix.scala }}; githubWorkflowCheck' + run: sbt '++${{ matrix.scala }}' 'project /' githubWorkflowCheck - env: SBT_OPTS: '-J-Xmx8G' - run: sbt --client '++${{ matrix.scala }}; clean; coverage; test; scalastyle; scalafmtCheck; scalafmtSbtCheck; Test / scalafmtCheck; unidoc; coverageReport' + run: sbt '++${{ matrix.scala }}' clean coverage test scalastyle scalafmtCheckAll scalafmtSbtCheck unidoc coverageReport - name: Code coverage analysis uses: codecov/codecov-action@v1 + - name: Make target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') + run: mkdir -p util/target target effect/target scalafix/input/target effect3/target finagle/target scalafix/rules/target scalafix/tests/target benchmark/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 util/target target effect/target scalafix/input/target effect3/target finagle/target scalafix/rules/target scalafix/tests/target benchmark/target project/target - name: Upload target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') uses: actions/upload-artifact@v2 with: - name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} + name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }} path: targets.tar publish: name: Publish Artifacts needs: [build] - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') strategy: matrix: os: [ubuntu-latest] scala: [2.13.6] - java: [adopt@1.8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -83,10 +96,12 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v12 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 8 - name: Cache sbt uses: actions/cache@v2 @@ -103,7 +118,7 @@ jobs: - name: Download target directories (2.12.15) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }} + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15 - name: Inflate target directories (2.12.15) run: | @@ -113,16 +128,23 @@ jobs: - name: Download target directories (2.13.6) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }} + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.6 - name: Inflate target directories (2.13.6) run: | tar xf targets.tar rm targets.tar - - env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbt --client '++${{ matrix.scala }}; ci-release' \ No newline at end of file + - name: Import signing key + if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' + run: echo $PGP_SECRET | base64 -d | gpg --import + + - name: Import signing key and strip passphrase + if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' + run: | + echo "$PGP_SECRET" | base64 -d > /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 + run: sbt '++${{ matrix.scala }}' tlRelease diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index b535fcc1..547aaa43 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -56,4 +56,4 @@ jobs: printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size ghapi -X DELETE $REPO/actions/artifacts/$id done - done \ No newline at end of file + done diff --git a/build.sbt b/build.sbt index a1568eb1..f4d2b2be 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,7 @@ val catsVersion = "2.6.1" +ThisBuild / tlBaseVersion := "21.8" // TODO + // For the transition period, we publish artifacts for both cats-effect 2.x and 3.x val catsEffectVersion = "2.5.4" val catsEffect3Version = "3.2.9" @@ -8,21 +10,12 @@ val utilVersion = "21.8.0" val finagleVersion = "21.8.0" ThisBuild / crossScalaVersions := Seq("2.12.15", "2.13.6") -ThisBuild / scalaVersion := crossScalaVersions.value.last - -ThisBuild / organization := "org.typelevel" (Global / onChangedBuildSource) := ReloadOnSourceChanges val docMappingsApiDir = settingKey[String]("Subdirectory in site target directory for API docs") lazy val baseSettings = Seq( - (Compile / console / scalacOptions) ~= { - _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports", "-Yno-imports", "-Yno-predef")) - }, - (Test / console / scalacOptions) ~= { - _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports", "-Yno-imports", "-Yno-predef")) - }, libraryDependencies ++= Seq( "org.typelevel" %% "cats-core" % catsVersion, "org.scalacheck" %% "scalacheck" % "1.15.4" % Test, @@ -36,11 +29,11 @@ lazy val baseSettings = Seq( docMappingsApiDir := "api" ) -lazy val allSettings = baseSettings ++ publishSettings +lazy val allSettings = baseSettings lazy val root = project .in(file(".")) - .enablePlugins(GhpagesPlugin, ScalaUnidocPlugin) + .enablePlugins(GhpagesPlugin, ScalaUnidocPlugin, NoPublishPlugin) .settings(allSettings) .settings( (ScalaUnidoc / unidoc / unidocProjectFilter) := inAnyProject -- inProjects( @@ -51,8 +44,7 @@ lazy val root = project `scalafix-tests` ), addMappingsToSiteDir((ScalaUnidoc / packageDoc / mappings), docMappingsApiDir), - git.remoteRepo := "git@github.com:typelevel/catbird.git", - publish / skip := true + git.remoteRepo := "git@github.com:typelevel/catbird.git" ) .settings( (console / initialCommands) := @@ -118,10 +110,10 @@ lazy val finagle = project .dependsOn(util) lazy val benchmark = project + .enablePlugins(NoPublishPlugin) .settings(allSettings) .settings( moduleName := "catbird-benchmark", - publish / skip := true, libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10", scalacOptions ~= { _.filterNot(Set("-Yno-imports", "-Yno-predef")) @@ -130,35 +122,9 @@ lazy val benchmark = project .enablePlugins(JmhPlugin) .dependsOn(util) -lazy val publishSettings = Seq( - homepage := Some(url("https://github.com/typelevel/catbird")), - licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), - (Test / publishArtifact) := false, - pomIncludeRepository := { _ => false }, - autoAPIMappings := true, - apiURL := Some(url("https://typelevel.org/catbird/api/")), - scmInfo := Some( - ScmInfo( - url("https://github.com/typelevel/catbird"), - "scm:git:git@github.com:typelevel/catbird.git" - ) - ), - developers += Developer("travisbrown", "Travis Brown", "", url("https://twitter.com/travisbrown")) -) +ThisBuild / apiURL := Some(url("https://typelevel.org/catbird/api/")) +ThisBuild / developers += Developer("travisbrown", "Travis Brown", "", url("https://twitter.com/travisbrown")) -ThisBuild / githubWorkflowJavaVersions := Seq("adopt@1.8") -ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) -ThisBuild / githubWorkflowPublish := Seq( - WorkflowStep.Sbt( - List("ci-release"), - env = Map( - "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", - "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", - "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", - "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}" - ) - ) -) ThisBuild / githubWorkflowBuild := Seq( WorkflowStep.Sbt( List( @@ -166,9 +132,8 @@ ThisBuild / githubWorkflowBuild := Seq( "coverage", "test", "scalastyle", - "scalafmtCheck", + "scalafmtCheckAll", "scalafmtSbtCheck", - "Test / scalafmtCheck", "unidoc", "coverageReport" ), diff --git a/project/plugins.sbt b/project/plugins.sbt index e01d256d..1328c4c1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,12 +1,7 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.3") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.4") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.31") From 8fa74b6d1fe4bdae13c1a281338e39ae47180c56 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 00:50:49 +0000 Subject: [PATCH 02/11] Remove sbt opts --- .github/workflows/ci.yml | 4 +--- build.sbt | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fd096d7..ede1148f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,9 +58,7 @@ jobs: - name: Check that workflows are up to date run: sbt '++${{ matrix.scala }}' 'project /' githubWorkflowCheck - - env: - SBT_OPTS: '-J-Xmx8G' - run: sbt '++${{ matrix.scala }}' clean coverage test scalastyle scalafmtCheckAll scalafmtSbtCheck unidoc coverageReport + - run: sbt '++${{ matrix.scala }}' clean coverage test scalastyle scalafmtCheckAll scalafmtSbtCheck unidoc coverageReport - name: Code coverage analysis uses: codecov/codecov-action@v1 diff --git a/build.sbt b/build.sbt index f4d2b2be..dc2de8dd 100644 --- a/build.sbt +++ b/build.sbt @@ -136,9 +136,6 @@ ThisBuild / githubWorkflowBuild := Seq( "scalafmtSbtCheck", "unidoc", "coverageReport" - ), - env = Map( - "SBT_OPTS" -> "-J-Xmx8G" ) ), WorkflowStep.Use( From 5597433c4e846270d6495ff6feec41b1d85aa344 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 00:51:35 +0000 Subject: [PATCH 03/11] Bump to latest sbt --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index e64c208f..c8fcab54 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.8 +sbt.version=1.6.2 From 219fa80a2d16582bbc95d7796b3366b9212eb5ee Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:00:53 +0000 Subject: [PATCH 04/11] Tweak settings --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index dc2de8dd..2cb38ed7 100644 --- a/build.sbt +++ b/build.sbt @@ -22,11 +22,11 @@ lazy val baseSettings = Seq( "org.scalatest" %% "scalatest" % "3.2.10" % Test, "org.typelevel" %% "cats-laws" % catsVersion % Test, "org.typelevel" %% "discipline-core" % "1.3.0" % Test, - "org.typelevel" %% "discipline-scalatest" % "2.1.5" % Test, - compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.2").cross(CrossVersion.full)) + "org.typelevel" %% "discipline-scalatest" % "2.1.5" % Test ), resolvers += Resolver.sonatypeRepo("snapshots"), - docMappingsApiDir := "api" + docMappingsApiDir := "api", + doc / tlFatalWarnings := false ) lazy val allSettings = baseSettings From d2861180f51ccb53179a2205ee87c623b7c0e60e Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:08:40 +0000 Subject: [PATCH 05/11] take 2 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 2cb38ed7..a0508dde 100644 --- a/build.sbt +++ b/build.sbt @@ -25,8 +25,7 @@ lazy val baseSettings = Seq( "org.typelevel" %% "discipline-scalatest" % "2.1.5" % Test ), resolvers += Resolver.sonatypeRepo("snapshots"), - docMappingsApiDir := "api", - doc / tlFatalWarnings := false + docMappingsApiDir := "api" ) lazy val allSettings = baseSettings @@ -43,6 +42,7 @@ lazy val root = project `scalafix-output`, `scalafix-tests` ), + (ScalaUnidoc / unidoc / tlFatalWarnings) := false, addMappingsToSiteDir((ScalaUnidoc / packageDoc / mappings), docMappingsApiDir), git.remoteRepo := "git@github.com:typelevel/catbird.git" ) From 5f96c35eb053345c2cf65340c5c3eead2c3c67b3 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:11:06 +0000 Subject: [PATCH 06/11] Poke ci From 819e28fc3ac4d4cc55fe636237b51d02ae54f7d8 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:14:03 +0000 Subject: [PATCH 07/11] Another try --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a0508dde..66444fde 100644 --- a/build.sbt +++ b/build.sbt @@ -42,7 +42,7 @@ lazy val root = project `scalafix-output`, `scalafix-tests` ), - (ScalaUnidoc / unidoc / tlFatalWarnings) := false, + (ScalaUnidoc / tlFatalWarnings) := false, addMappingsToSiteDir((ScalaUnidoc / packageDoc / mappings), docMappingsApiDir), git.remoteRepo := "git@github.com:typelevel/catbird.git" ) From 482e885271a4bab849ce5af6a4993726ab463617 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:33:51 +0000 Subject: [PATCH 08/11] Gotcha --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 66444fde..133acfec 100644 --- a/build.sbt +++ b/build.sbt @@ -25,7 +25,8 @@ lazy val baseSettings = Seq( "org.typelevel" %% "discipline-scalatest" % "2.1.5" % Test ), resolvers += Resolver.sonatypeRepo("snapshots"), - docMappingsApiDir := "api" + docMappingsApiDir := "api", + autoAPIMappings := true ) lazy val allSettings = baseSettings @@ -42,7 +43,6 @@ lazy val root = project `scalafix-output`, `scalafix-tests` ), - (ScalaUnidoc / tlFatalWarnings) := false, addMappingsToSiteDir((ScalaUnidoc / packageDoc / mappings), docMappingsApiDir), git.remoteRepo := "git@github.com:typelevel/catbird.git" ) From b4dc5aae3fb6e06254ad244daee094106eeeaf6c Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:36:30 +0000 Subject: [PATCH 09/11] Poke CI From ac11461bb240db8daa95cafabd5686b591477a6b Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 2 Feb 2022 01:41:26 +0000 Subject: [PATCH 10/11] Disable snapshots for now --- .github/workflows/ci.yml | 8 ++++---- build.sbt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ede1148f..30e14df2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,15 +64,15 @@ jobs: uses: codecov/codecov-action@v1 - name: Make target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) run: mkdir -p util/target target effect/target scalafix/input/target effect3/target finagle/target scalafix/rules/target scalafix/tests/target benchmark/target project/target - name: Compress target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) run: tar cf targets.tar util/target target effect/target scalafix/input/target effect3/target finagle/target scalafix/rules/target scalafix/tests/target benchmark/target project/target - name: Upload target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) uses: actions/upload-artifact@v2 with: name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }} @@ -81,7 +81,7 @@ jobs: publish: name: Publish Artifacts needs: [build] - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) strategy: matrix: os: [ubuntu-latest] diff --git a/build.sbt b/build.sbt index 133acfec..59dacb58 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,7 @@ val catsVersion = "2.6.1" ThisBuild / tlBaseVersion := "21.8" // TODO +ThisBuild / tlCiReleaseBranches := Seq() // For the transition period, we publish artifacts for both cats-effect 2.x and 3.x val catsEffectVersion = "2.5.4" From 1d8c3d22c52612973d981c41b0ed10e2ce156ccd Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Tue, 10 May 2022 22:07:30 +0000 Subject: [PATCH 11/11] Bump sbt-typelevel --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++---- project/plugins.sbt | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30e14df2..e7c63b54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ on: 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 }} @@ -36,12 +37,21 @@ jobs: with: fetch-depth: 0 + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' uses: actions/setup-java@v2 with: - distribution: temurin + distribution: jdkfile java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} - name: Cache sbt uses: actions/cache@v2 @@ -94,12 +104,21 @@ jobs: with: fetch-depth: 0 + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' uses: actions/setup-java@v2 with: - distribution: temurin + distribution: jdkfile java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} - name: Cache sbt uses: actions/cache@v2 @@ -135,12 +154,12 @@ jobs: - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' - run: echo $PGP_SECRET | base64 -d | gpg --import + run: echo $PGP_SECRET | base64 -di | gpg --import - name: Import signing key and strip passphrase if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' run: | - echo "$PGP_SECRET" | base64 -d > /tmp/signing-key.gpg + echo "$PGP_SECRET" | base64 -di > /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) diff --git a/project/plugins.sbt b/project/plugins.sbt index 1328c4c1..fe2f1ecc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.3") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.9") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2")