diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0aeb448a..2a1ee13e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: coursier/cache-action@v5 - name: Setup Scala @@ -60,7 +62,9 @@ jobs: - 5432:5432 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: coursier/cache-action@v5 - name: Setup Scala diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index a75203377..9748c4ea1 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -20,14 +20,22 @@ on: types: [released] jobs: - publish: + publish-to-sonatype: + name: Publish to Sonatype runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: olafurpg/setup-scala@v14 - - name: Run sbt ci-release (produces jar as well) + - uses: coursier/cache-action@v5 + + - name: Setup Scala + uses: olafurpg/setup-scala@v14 + with: + java-version: "adopt@1.8" + + - name: Run sbt ci-release run: sbt ci-release env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} @@ -35,6 +43,24 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + + publish-server-jar: + name: Publish server jar + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: coursier/cache-action@v5 + + - name: Setup Scala + uses: olafurpg/setup-scala@v14 + with: + java-version: "adopt@1.11.0-11" + - name: Run sbt assembly (produces jar) + run: sbt assembly + - name: Find JAR file id: find_jar run: echo "JAR_PATH=$(find . -name 'server/target/jvm-2.13/*.jar' | head -n 1)" >> $GITHUB_ENV diff --git a/project/Setup.scala b/project/Setup.scala index 42ed27eac..2f5a863a9 100644 --- a/project/Setup.scala +++ b/project/Setup.scala @@ -43,14 +43,14 @@ object Setup { val commonScalacOptions: Seq[String] = Seq("-unchecked", "-deprecation", "-feature", "-Xfatal-warnings") val serverAndDbJavacOptions: Seq[String] = Seq("-source", "11", "-target", "11", "-Xlint") - val serverAndDbScalacOptions: Seq[String] = Seq("-release", "11", "-Ymacro-annotations") + val serverAndDbScalacOptions: Seq[String] = Seq("-Ymacro-annotations") val clientJavacOptions: Seq[String] = Seq("-source", "1.8", "-target", "1.8", "-Xlint") def clientScalacOptions(scalaVersion: Version): Seq[String] = { if (scalaVersion >= scala213) { Seq("-release", "8", "-Ymacro-annotations") } else { - Seq("-target", "8", "-release", "8") + Seq("-release", "8", "-target:8") } }