Skip to content

Commit 6434348

Browse files
authored
Try sbt-publish-ci (#1985)
* no op change * diff changes
1 parent ebbfeb7 commit 6434348

File tree

3 files changed

+7
-46
lines changed

3 files changed

+7
-46
lines changed

.github/workflows/publish.yml

+5-20
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Publish
33
on:
44
push:
55
branches:
6-
- 'develop'
6+
- "develop"
77
release:
8-
types: [ created ]
8+
types: [created]
99

1010
jobs:
1111
publish:
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-java@v2
2121
with:
22-
distribution: 'adopt-openj9'
22+
distribution: "adopt-openj9"
2323
java-version: 8
2424

2525
- name: Set up Ruby
@@ -32,26 +32,11 @@ jobs:
3232
gem install sass -v 3.7.4
3333
gem install jekyll -v 3.2.1
3434
35-
# whenever a push is made to develop, this will run to publish a SNAPSHOT
36-
- name: "Publish Snapshot"
37-
if: ${{ github.event_name == 'push' }}
35+
- name: "Publish"
3836
env:
3937
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
4038
PGP_SECRET: ${{ secrets.PGP_SECRET }}
4139
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
4240
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
4341
run: |
44-
# snapshots will be versioned in the form of <latest version tag>-<commit SHA>-SNAPSHOT
45-
# example: 0.16.1-RC2-377-0c41d610-SNAPSHOT
46-
./sbt "release"
47-
48-
# whenever a release is triggered through Github UI, this will run to publish a final release
49-
- name: "Publish Final Release"
50-
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
51-
env:
52-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
53-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
54-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
55-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
56-
run: |
57-
./sbt "release"
42+
./sbt "ci-release"

build.sbt

+1-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import ReleaseTransformations._
21
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
32
import scala.collection.JavaConverters._
43
import microsites.ExtraMdFileConfig
@@ -63,6 +62,7 @@ val sharedSettings = Seq(
6362
crossScalaVersions := Seq(scalaVersion.value, "2.12.14"),
6463
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
6564
doc / javacOptions := Seq("-source", "1.8"),
65+
versionScheme := Some("early-semver"),
6666
Compile / compile / wartremoverErrors ++= Seq(
6767
//Wart.OptionPartial, // this kills the ability to use serialization macros
6868
Wart.ExplicitImplicitTypes,
@@ -125,32 +125,8 @@ val sharedSettings = Seq(
125125
assembly / logLevel := Level.Warn,
126126

127127
// Publishing options:
128-
releaseCrossBuild := true,
129-
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
130-
ThisBuild / dynverSonatypeSnapshots := true, // prepend "-SNAPSHOT" to version tag when releasing a snapshot style build
131-
ThisBuild / dynverSeparator := "-", // use a URI friendly separator for snapshots instead of '+' char
132-
publishMavenStyle := true,
133128
Test / publishArtifact := false,
134129
pomIncludeRepository := { x => false },
135-
releaseProcess := (
136-
if (version.value.trim.endsWith("SNAPSHOT"))
137-
Seq[ReleaseStep](
138-
runClean,
139-
publishArtifacts,
140-
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
141-
)
142-
else Seq[ReleaseStep](
143-
checkSnapshotDependencies,
144-
runClean,
145-
publishArtifacts,
146-
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
147-
)
148-
),
149-
publishTo := Some(
150-
if (version.value.trim.endsWith("SNAPSHOT"))
151-
Opts.resolver.sonatypeSnapshots
152-
else Opts.resolver.sonatypeStaging
153-
),
154130

155131
// Janino includes a broken signature, and is not needed:
156132
assembly / assemblyExcludedJars := {

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
88
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
99
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")
1010
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
11-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
11+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
1212
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
1313
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
1414
addSbtPlugin("com.twitter" %% "scrooge-sbt-plugin" % "18.9.0")

0 commit comments

Comments
 (0)