Skip to content

Commit

Permalink
Publish to Sonatype using sbt-ci-release (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmunier authored Jun 12, 2021
1 parent eb7bad7 commit 86ce13d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
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 }}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
41 changes: 15 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
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",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"
)

pomExtra := (
<scm>
<url>git@github.com:vmunier/scalajs-scripts.git</url>
<connection>scm:git:git@github.com:vmunier/scalajs-scripts.git</connection>
</scm>
<developers>
<developer>
<id>vmunier</id>
<name>Vincent Munier</name>
<url>https://github.com/vmunier</url>
</developer>
</developers>
)
publishMavenStyle := true
bintrayRepository := "scalajs"
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 86ce13d

Please sign in to comment.