Skip to content

Commit b6cd0a4

Browse files
committed
Setup CI release
1 parent 6cd62c5 commit b6cd0a4

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
on:
3+
push:
4+
tags: ["v*"]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-20.04
8+
strategy:
9+
matrix:
10+
scalajsversion: ["1.x", "0.6.x"]
11+
env:
12+
SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}"
13+
steps:
14+
- uses: actions/[email protected]
15+
with:
16+
fetch-depth: 0
17+
- uses: olafurpg/setup-scala@v10
18+
- run: sbt ci-release
19+
env:
20+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
21+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
22+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
23+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ val commonSettings = Seq(
1717
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
1818
)
1919

20+
val noPublishSettings = Seq(
21+
skip in publish := true,
22+
publish := (()),
23+
publishLocal := (()),
24+
publishArtifact := false,
25+
publishTo := None
26+
)
27+
2028
normalizedName := "scalajs-dom"
2129

2230
commonSettings
@@ -115,9 +123,10 @@ lazy val readme = ScalatexReadme(
115123
scalaVersion := "2.12.10",
116124
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
117125
(Compile / resources) += (example / Compile / fullOptJS).value.data
118-
)
126+
).settings(noPublishSettings: _*)
119127

120128
lazy val example = project.
121129
enablePlugins(ScalaJSPlugin).
122130
settings(commonSettings: _*).
131+
settings(noPublishSettings: _*).
123132
dependsOn(root)

0 commit comments

Comments
 (0)