Skip to content

Commit a45cfbe

Browse files
committed
Set up sbt-ci-release.
1 parent 3ee0d5d commit a45cfbe

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [main]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v5
11+
with:
12+
fetch-depth: 0
13+
- uses: actions/setup-java@v5
14+
with:
15+
java-version: 8
16+
distribution: adopt
17+
- uses: sbt/setup-sbt@v1
18+
- uses: coursier/cache-action@v6
19+
- run: sbt ci-release
20+
env:
21+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
22+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
23+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
24+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
inThisBuild(Seq(
2-
version := "1.1.1-SNAPSHOT",
32
organization := "org.scala-js",
43

54
crossScalaVersions := Seq("2.12.10", "2.11.12", "2.13.1"),
@@ -24,14 +23,6 @@ val commonSettings = Def.settings(
2423
},
2524
autoAPIMappings := true,
2625

27-
publishMavenStyle := true,
28-
publishTo := {
29-
val nexus = "https://oss.sonatype.org/"
30-
if (isSnapshot.value)
31-
Some("snapshots" at nexus + "content/repositories/snapshots")
32-
else
33-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
34-
},
3526
pomExtra := (
3627
<developers>
3728
<developer>
@@ -56,9 +47,7 @@ val commonSettings = Def.settings(
5647

5748
lazy val root: Project = project.in(file(".")).
5849
settings(
59-
Compile / publishArtifact := false,
60-
publish := {},
61-
publishLocal := {},
50+
publish / skip := true,
6251

6352
clean := clean.dependsOn(
6453
`scalajs-env-jsdom-nodejs` / clean,
@@ -91,6 +80,7 @@ lazy val `test-project`: Project = project.
9180
enablePlugins(ScalaJSPlugin).
9281
enablePlugins(ScalaJSJUnitPlugin).
9382
settings(
83+
publish / skip := true,
9484
scalaJSUseMainModuleInitializer := true,
9585
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()
9686
)

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0")
2+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")
23

34
libraryDependencies += "org.scala-js" %% "scalajs-env-nodejs" % "1.0.0"
45

0 commit comments

Comments
 (0)