-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from ckipp01/release
Update CI and release strategy
- Loading branch information
Showing
6 changed files
with
67 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: ["*"] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- uses: olafurpg/setup-scala@v10 | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
name := "sbt-scoverage" | ||
organization := "org.scoverage" | ||
|
||
import sbt.ScriptedPlugin.autoImport.scriptedLaunchOpts | ||
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._ | ||
|
||
releaseProcess := Seq[ReleaseStep]( | ||
checkSnapshotDependencies, | ||
inquireVersions, | ||
runClean, | ||
releaseStepCommandAndRemaining("test"), | ||
setReleaseVersion, | ||
commitReleaseVersion, | ||
tagRelease, | ||
releaseStepCommandAndRemaining("publishSigned"), | ||
setNextVersion, | ||
commitNextVersion, | ||
pushChanges | ||
def localSnapshotVersion = "1.7.1-SNAPSHOT" | ||
def isCI = System.getenv("CI") != null | ||
|
||
inThisBuild( | ||
List( | ||
organization := "org.scoverage", | ||
homepage := Some(url("http://scoverage.org/")), | ||
developers := List( | ||
Developer( | ||
"sksamuel", | ||
"Stephen Samuel", | ||
"[email protected]", | ||
url("https://github.com/sksamuel") | ||
), | ||
Developer( | ||
"gslowikowski", | ||
"Grzegorz Slowikowski", | ||
"[email protected]", | ||
url("https://github.com/gslowikowski") | ||
) | ||
), | ||
licenses := Seq( | ||
"Apache-2.0" -> url("http://www.apache.org/license/LICENSE-2.0") | ||
), | ||
scalaVersion := "2.12.13", | ||
version ~= { dynVer => | ||
if (isCI) dynVer | ||
else localSnapshotVersion // only for local publishing | ||
} | ||
) | ||
) | ||
|
||
lazy val root = Project("sbt-scoverage", file(".")) | ||
|
@@ -24,55 +40,22 @@ lazy val root = Project("sbt-scoverage", file(".")) | |
libraryDependencies ++= Seq( | ||
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Compile | ||
), | ||
libraryDependencies += "org.scoverage" %% "scalac-scoverage-plugin" % "1.4.3" cross(CrossVersion.full), | ||
scalaVersion := "2.12.13", | ||
publishMavenStyle := true, | ||
publishConfiguration := publishConfiguration.value.withOverwrite(true), | ||
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true), | ||
releasePublishArtifactsAction := PgpKeys.publishSigned.value, | ||
libraryDependencies += "org.scoverage" %% "scalac-scoverage-plugin" % "1.4.3" cross (CrossVersion.full), | ||
Test / fork := false, | ||
Test / publishArtifact := false, | ||
Test / parallelExecution := false, | ||
scalacOptions := Seq("-unchecked", "-deprecation", "-feature", "-encoding", "utf8"), | ||
publishTo := { | ||
if (isSnapshot.value) | ||
Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots") | ||
else | ||
Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") | ||
}, | ||
scalacOptions := Seq( | ||
"-unchecked", | ||
"-deprecation", | ||
"-feature", | ||
"-encoding", | ||
"utf8" | ||
), | ||
resolvers ++= { | ||
if (isSnapshot.value) Seq(Resolver.sonatypeRepo("snapshots")) else Nil | ||
}, | ||
scriptedLaunchOpts ++= Seq( | ||
"-Xmx1024M", | ||
"-Dplugin.version=" + version.value | ||
), | ||
pomExtra := { | ||
<url>https://github.com/scoverage/sbt-scoverage</url> | ||
<licenses> | ||
<license> | ||
<name>Apache 2</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<url>git@github.com:scoverage/sbt-scoverage.git</url> | ||
<connection>scm:git@github.com:scoverage/sbt-scoverage.git</connection> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>sksamuel</id> | ||
<name>sksamuel</name> | ||
<url>http://github.com/sksamuel</url> | ||
</developer> | ||
<developer> | ||
<id>gslowikowski</id> | ||
<name>Grzegorz Slowikowski</name> | ||
<url>http://github.com/gslowikowski</url> | ||
</developer> | ||
</developers> | ||
} | ||
) | ||
) | ||
|
||
scalariformAutoformat := false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value | ||
|
||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") | ||
|
||
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.1") | ||
|
||
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.