diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..b6d14970f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Release +on: + push: + branches: [master, main] + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: olafurpg/setup-scala@v13 + - run: sbt test ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/build.sbt b/build.sbt index f98734403..0e950fc97 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,27 @@ +inThisBuild( + List( + organization := "net.exoego", + licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), + scmInfo := Some( + ScmInfo( + url("https://github.com/exoego/scala-js-nodejs"), + "scm:git:git@github.com:exoego/scala-js-nodejs.git" + ) + ), + homepage := scmInfo.value.map(_.browseUrl), + developers := List( + Developer( + id = "exoego", + name = "TATSUNO Yasuhiro", + email = "ytatsuno.jp@gmail.com", + url = url("https://www.exoego.net") + ) + ) + ) +) + lazy val scala213 = "2.13.8" lazy val scala212 = "2.12.15" -ThisBuild / organization := "net.exoego" ThisBuild / crossScalaVersions := Seq(scala213, scala212) ThisBuild / scalaVersion := scala213 Global / excludeLintKeys ++= Set(publishArtifact, scalacOptions) diff --git a/project/MySettings.scala b/project/MySettings.scala index acf12766f..dcf7d0eb2 100644 --- a/project/MySettings.scala +++ b/project/MySettings.scala @@ -84,51 +84,11 @@ object MySettings { ) lazy val publishingSettings = Seq( - licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), - scmInfo := Some( - ScmInfo( - url("https://github.com/exoego/scala-js-nodejs"), - "scm:git:git@github.com:exoego/scala-js-nodejs.git" - ) - ), - homepage := scmInfo.value.map(_.browseUrl), - developers := List( - Developer( - id = "exoego", - name = "TATSUNO Yasuhiro", - email = "ytatsuno.jp@gmail.com", - url = url("https://www.exoego.net") - ) - ), - publishMavenStyle := true, Test / publishArtifact := false, Compile / packageDoc / publishArtifact := true, Compile / packageSrc / publishArtifact := true, - packageDoc / publishArtifact := true, pomIncludeRepository := { _ => false - }, - publishTo := Some( - if (isSnapshot.value) - Opts.resolver.sonatypeSnapshots - else - Opts.resolver.sonatypeStaging - ), - publishConfiguration := publishConfiguration.value.withOverwrite(false), - publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true), - releaseIgnoreUntrackedFiles := true, - releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - runClean, - runTest, - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - setNextVersion, - commitNextVersion, - releaseStepCommand("sonatypeReleaseAll") - ) + } ) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 52d8c78e3..ec2749f54 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,5 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10") -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9") diff --git a/script/release.sh b/script/release.sh deleted file mode 100755 index 8a6a0fa7b..000000000 --- a/script/release.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -cat ./version.sbt - -export LANG=C -sbt clean +publishSigned sonatypeBundleUpload sonatypeReleaseAll diff --git a/version.sbt b/version.sbt deleted file mode 100644 index c26d7ac12..000000000 --- a/version.sbt +++ /dev/null @@ -1 +0,0 @@ -ThisBuild / version := "0.14.0"