diff --git a/.github/workflows/java-format.yml b/.github/workflows/java-format.yml new file mode 100644 index 0000000..974dbb0 --- /dev/null +++ b/.github/workflows/java-format.yml @@ -0,0 +1,28 @@ +name: Headers + +on: + pull_request: + +permissions: {} + +jobs: + build: + name: Java code is formatted + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Java 8 + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.4.0 + + - name: Check headers + run: |- + sbt \ + +javafmtCheck diff --git a/project/plugins.sbt b/project/plugins.sbt index 9a13543..f368ea4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,4 @@ -addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M10") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M10") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")