diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2cd0ada --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release +on: + push: + branches: [master, main] + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: olafurpg/setup-scala@v10 + - uses: olafurpg/setup-gpg@v3 + - 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 }} diff --git a/README.md b/README.md index 66126e9..dbed05d 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,4 @@ The `raw` function in ScalaTags allows you to embed raw HTML in the tag and call ## Publish a new version of the library -``` -$ sbt +publishSigned -``` +New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release). \ No newline at end of file diff --git a/build.sbt b/build.sbt index 5a867eb..4ffa756 100644 --- a/build.sbt +++ b/build.sbt @@ -1,19 +1,24 @@ -name := "scalajs-scripts" - -version := "1.1.5-SNAPSHOT" - -organization := "com.vmunier" - -homepage := Some(url("https://github.com/vmunier/scalajs-scripts")) +inThisBuild(List( + organization := "com.vmunier", + homepage := Some(url("https://github.com/vmunier/scalajs-scripts")), + licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), + developers := List( + Developer( + "vmunier", + "Vincent Munier", + "", + url("https://github.com/vmunier") + ) + ), + dynverSeparator := "-" +)) +name := "scalajs-scripts" scalaVersion := "2.13.2" - crossScalaVersions := Seq("2.12.11", scalaVersion.value) enablePlugins(SbtTwirl) -licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")) - scalacOptions ++= Seq( "-encoding", "utf8", "-deprecation", "-feature", "-unchecked", "-Xlint", @@ -21,19 +26,3 @@ scalacOptions ++= Seq( "-Ywarn-numeric-widen", "-Ywarn-value-discard" ) - -pomExtra := ( - - git@github.com:vmunier/scalajs-scripts.git - scm:git:git@github.com:vmunier/scalajs-scripts.git - - - - vmunier - Vincent Munier - https://github.com/vmunier - - -) -publishMavenStyle := true -bintrayRepository := "scalajs" diff --git a/project/plugins.sbt b/project/plugins.sbt index c70ec57..4d0ee97 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,4 @@ resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.2") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")