diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 731d4e92..f9b403a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,25 +14,30 @@ jobs: - uses: actions/checkout@v4 - name: scalafmt run: ./sbt scalafmtCheckAll - test_jdk11: - name: Test JDK11 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 11 - - name: sbt scripted test - run: ./sbt compile scripted - test_jdk17: - name: Test JDK17 - runs-on: ubuntu-latest + test: + name: Test + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + distribution: zulu + java: 8 + - os: ubuntu-latest + distribution: temurin + java: 11 + - os: ubuntu-latest + distribution: temurin + java: 17 + - os: windows-latest + distribution: temurin + java: 17 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: 17 + distribution: "${{ matrix.distribution }}" + java-version: "${{ matrix.java }}" - name: sbt scripted test run: ./sbt compile scripted diff --git a/src/main/scala/xerial/sbt/sonatype/SonatypeCentralService.scala b/src/main/scala/xerial/sbt/sonatype/SonatypeCentralService.scala index 7dc1eda1..658a60ed 100644 --- a/src/main/scala/xerial/sbt/sonatype/SonatypeCentralService.scala +++ b/src/main/scala/xerial/sbt/sonatype/SonatypeCentralService.scala @@ -2,7 +2,7 @@ package xerial.sbt.sonatype import com.lumidion.sonatype.central.client.core.{DeploymentName, PublishingType} import java.io.{File, FileInputStream, FileOutputStream} -import java.nio.file.{Files, Path} +import java.nio.file.{Files, Path, Paths} import java.util.zip.{ZipEntry, ZipOutputStream} import scala.util.Try import wvlet.log.LogSupport @@ -16,7 +16,7 @@ private[sbt] class SonatypeCentralService(client: SonatypeCentralClient) extends deploymentName: DeploymentName, publishingType: PublishingType ): Either[SonatypeException, Unit] = for { - bundleZipDirectory <- Try(Files.createDirectory(Path.of(s"${localBundlePath.getPath}-bundle"))).toEither.leftMap { + bundleZipDirectory <- Try(Files.createDirectory(Paths.get(s"${localBundlePath.getPath}-bundle"))).toEither.leftMap { err => SonatypeException(BUNDLE_ZIP_ERROR, s"Error creating bundle zip directory. ${err.getMessage}") }