-
Notifications
You must be signed in to change notification settings - Fork 0
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 #159 from mdsol/tech/update_http4s
Replace SBT Smart Release
- Loading branch information
Showing
11 changed files
with
83 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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,40 @@ | ||
name: Continuous Integration | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
tags: | ||
- "v*" | ||
permissions: | ||
contents: write | ||
|
||
env: | ||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
jobs: | ||
test_and_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: coursier/cache-action@v6 | ||
- uses: coursier/setup-action@v1 | ||
with: | ||
jvm: temurin:11 | ||
- name: Lint | ||
run: sbt "scalafmtSbtCheck;scalafmtCheckAll" | ||
- name: Test | ||
run: sbt "+test" | ||
env: | ||
APP_MAUTH_UUID: 398ea708-50eb-499f-98d3-14cc7692668c | ||
APP_MAUTH_PRIVATE_KEY: ${{ secrets.FAKE_PRIVATE_KEY }} | ||
- name: Release | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: sbt ci-release | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
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,22 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
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,12 +1,7 @@ | ||
import java.util | ||
|
||
import com.jsuereth.sbtpgp.SbtPgp.autoImport._ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbtrelease.ReleasePlugin.autoImport._ | ||
import smartrelease.SmartReleasePlugin.ReleaseSteps | ||
import xerial.sbt.Sonatype.SonatypeKeys._ | ||
import xerial.sbt.Sonatype._ | ||
|
||
object BuildSettings { | ||
val env: util.Map[String, String] = System.getenv() | ||
|
@@ -20,7 +15,7 @@ object BuildSettings { | |
description := "MAuth clients", | ||
scalaVersion := scala213, | ||
resolvers += Resolver.mavenLocal, | ||
resolvers += Resolver.sonatypeRepo("releases"), | ||
resolvers ++= Resolver.sonatypeOssRepos("releases"), | ||
javacOptions ++= Seq("-encoding", "UTF-8"), | ||
// Avoid issues such as java.lang.IllegalAccessError: tried to access method org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey | ||
// By running tests in a separate JVM | ||
|
@@ -37,24 +32,14 @@ object BuildSettings { | |
Seq.empty | ||
else | ||
Seq("-Xfatal-warnings") | ||
}, | ||
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", env.get("SONATYPE_USER"), env.get("SONATYPE_TOKEN")), | ||
publishTo := Some( | ||
if (isSnapshot.value) { | ||
Opts.resolver.sonatypeSnapshots | ||
} else { | ||
Opts.resolver.sonatypeStaging | ||
} | ||
) | ||
} | ||
) | ||
|
||
lazy val noPublishSettings = Seq( | ||
publish / skip := true | ||
) | ||
|
||
lazy val publishSettings = Seq( | ||
sonatypeProfileName := "com.mdsol", | ||
publishMavenStyle := true, | ||
licenses := Seq("MDSOL" -> url("https://github.com/mdsol/mauth-jvm-clients/blob/master/LICENSE.txt")), | ||
scmInfo := Some( | ||
ScmInfo( | ||
|
@@ -63,35 +48,12 @@ object BuildSettings { | |
) | ||
), | ||
developers := List( | ||
Developer(id = "austek", name = "Ali Ustek", email = "[email protected]", url = url("https://github.com/austek")) | ||
), | ||
sonatypeProjectHosting := Some(GitHubHosting("austek", "mauth-jvm-clients", "[email protected]")), | ||
publishTo := sonatypePublishToBundle.value, | ||
releaseTagComment := s"Releasing ${(ThisBuild / version).value} [ci skip]", | ||
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value} [ci skip]", | ||
releaseNextCommitMessage := s"Setting version to ${(ThisBuild / version).value} [ci skip]", | ||
releasePublishArtifactsAction := PgpKeys.publishSigned.value, | ||
releaseCrossBuild := false, // true if you cross-build the project for multiple Scala versions | ||
releaseProcess := releaseSteps, | ||
credentials += Credentials( | ||
"GnuPG Key ID", | ||
"pgp", | ||
"A9A6453ABA90E61B2492BDCD9F58C26F3772CEEE", | ||
"ignored" | ||
Developer( | ||
"scala-mdsol", | ||
"Medidata Scala Team", | ||
"[email protected]", | ||
url("https://github.com/mdsol/sbt-smartrelease") | ||
) | ||
) | ||
) | ||
|
||
val releaseSteps: Seq[ReleaseStep] = { | ||
import sbtrelease.ReleaseStateTransformations._ | ||
Seq( | ||
checkSnapshotDependencies, | ||
ReleaseSteps.checkCurrentVersionIsValidReleaseVersion, | ||
ReleaseSteps.checkReleaseVersionStep, | ||
ReleaseSteps.fetchAllFromOrigin, | ||
ReleaseSteps.checkThisCommitExistOnMaster, | ||
runClean, | ||
releaseStepCommandAndRemaining("+publishSigned"), | ||
releaseStepCommand("sonatypeBundleRelease") | ||
) | ||
} | ||
} |
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,9 +1,5 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") | ||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") | ||
addSbtPlugin("com.mdsol" % "sbt-smartrelease" % "0.3.4") | ||
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.15.0") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") | ||
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.8.2") | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") | ||
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.15.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") | ||
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.8.2") | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") |