Skip to content

Commit 86ce13d

Browse files
authored
Publish to Sonatype using sbt-ci-release (#53)
1 parent eb7bad7 commit 86ce13d

File tree

4 files changed

+37
-31
lines changed

4 files changed

+37
-31
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [master, main]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/[email protected]
11+
with:
12+
fetch-depth: 0
13+
- uses: olafurpg/setup-scala@v10
14+
- uses: olafurpg/setup-gpg@v3
15+
- run: sbt ci-release
16+
env:
17+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
18+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
19+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
20+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,4 @@ The `raw` function in ScalaTags allows you to embed raw HTML in the tag and call
115115

116116
## Publish a new version of the library
117117

118-
```
119-
$ sbt +publishSigned
120-
```
118+
New versions are automatically published to Sonatype when creating a git tag, thanks to [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release).

build.sbt

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
1-
name := "scalajs-scripts"
2-
3-
version := "1.1.5-SNAPSHOT"
4-
5-
organization := "com.vmunier"
6-
7-
homepage := Some(url("https://github.com/vmunier/scalajs-scripts"))
1+
inThisBuild(List(
2+
organization := "com.vmunier",
3+
homepage := Some(url("https://github.com/vmunier/scalajs-scripts")),
4+
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
5+
developers := List(
6+
Developer(
7+
"vmunier",
8+
"Vincent Munier",
9+
"",
10+
url("https://github.com/vmunier")
11+
)
12+
),
13+
dynverSeparator := "-"
14+
))
815

16+
name := "scalajs-scripts"
917
scalaVersion := "2.13.2"
10-
1118
crossScalaVersions := Seq("2.12.11", scalaVersion.value)
1219

1320
enablePlugins(SbtTwirl)
1421

15-
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
16-
1722
scalacOptions ++= Seq(
1823
"-encoding", "utf8",
1924
"-deprecation", "-feature", "-unchecked", "-Xlint",
2025
"-Ywarn-dead-code",
2126
"-Ywarn-numeric-widen",
2227
"-Ywarn-value-discard"
2328
)
24-
25-
pomExtra := (
26-
<scm>
27-
<url>git@github.com:vmunier/scalajs-scripts.git</url>
28-
<connection>scm:git:git@github.com:vmunier/scalajs-scripts.git</connection>
29-
</scm>
30-
<developers>
31-
<developer>
32-
<id>vmunier</id>
33-
<name>Vincent Munier</name>
34-
<url>https://github.com/vmunier</url>
35-
</developer>
36-
</developers>
37-
)
38-
publishMavenStyle := true
39-
bintrayRepository := "scalajs"

project/plugins.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
22

33
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
4-
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
5-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.2")
4+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

0 commit comments

Comments
 (0)