Skip to content

Commit

Permalink
Merge pull request #99 from sh0hei/hello-scala3
Browse files Browse the repository at this point in the history
Hello, Scala3 🎉
  • Loading branch information
sh0hei authored Jun 1, 2021
2 parents 622a319 + ecee8f3 commit ec3f2e6
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 8 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.14, 2.13.6]
scala: [2.12.14, 2.13.6, 3.0.0]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
scala: [3.0.0]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -123,6 +123,16 @@ jobs:
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.0.0)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-3.0.0-${{ matrix.java }}

- name: Inflate target directories (3.0.0)
run: |
tar xf targets.tar
rm targets.tar
- env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand Down
25 changes: 25 additions & 0 deletions HOW-TO-RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Release process

How to create a new [release](../../releases).

## Releasing

The release process is automated thanks to:
- https://github.com/djspiewak/sbt-github-actions#integration-with-sbt-ci-release
- https://github.com/olafurpg/sbt-ci-release

To release, push a git tag:

```
git tag -a v0.1.0 -m "v0.1.0"
git push origin v0.1.0
```
Note that the tag version MUST start with `v`.

Wait for the [CI pipeline](../../actions) to release the new version. Publishing the artifacts on maven central can take time.

## Updating the release notes

Open the [releases](../../releases). A draft should already be prepared.

Edit the draft release to set the released version. Complete the release notes if necessary. And save it.
22 changes: 17 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
val isScala3 = Def.setting(
CrossVersion.partialVersion(scalaVersion.value).exists(_._1 == 3)
)

name := "sangria-circe"
organization := "org.sangria-graphql"
mimaPreviousArtifacts := Set("org.sangria-graphql" %% "sangria-circe" % "1.3.1")
mimaPreviousArtifacts := {
if (isScala3.value)
Set.empty
else
Set("org.sangria-graphql" %% "sangria-circe" % "1.3.1")
}

description := "Sangria circe marshalling"
homepage := Some(url("http://sangria-graphql.org"))
licenses := Seq(
"Apache License, ASL Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))

ThisBuild / crossScalaVersions := Seq("2.12.14", "2.13.6")
ThisBuild / crossScalaVersions := Seq("2.12.14", "2.13.6", "3.0.0")
ThisBuild / scalaVersion := crossScalaVersions.value.last
ThisBuild / githubWorkflowPublishTargetBranches := List()
ThisBuild / githubWorkflowBuildPreamble ++= List(
Expand All @@ -16,8 +25,12 @@ ThisBuild / githubWorkflowBuildPreamble ++= List(
)

scalacOptions ++= Seq("-deprecation", "-feature")

scalacOptions += "-target:jvm-1.8"
scalacOptions ++= {
if (isScala3.value)
Seq("-Xtarget:8")
else
Seq("-target:jvm-1.8")
}
javacOptions ++= Seq("-source", "8", "-target", "8")

val circeVersion = "0.14.1"
Expand All @@ -34,7 +47,6 @@ libraryDependencies ++= Seq(
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(RefPredicate.StartsWith(Ref.Tag("v")))

ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ci-release"),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.2
sbt.version=1.5.3
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

0 comments on commit ec3f2e6

Please sign in to comment.