Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#205: Release process is broken #206

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
34 changes: 30 additions & 4 deletions .github/workflows/release_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,47 @@ 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: "[email protected]"

- name: Run sbt ci-release
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
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: "[email protected]"
- 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
Expand Down
4 changes: 2 additions & 2 deletions project/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
lsulak marked this conversation as resolved.
Show resolved Hide resolved

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")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it really needed together? "-target:8"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

}
}

Expand Down
Loading