Skip to content

Commit

Permalink
chore(*): Automate releases vi CI
Browse files Browse the repository at this point in the history
  • Loading branch information
d11-amitsingh committed Mar 27, 2021
1 parent b7b78c0 commit be78c94
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 21 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
- uses: olafurpg/setup-gpg@v3
- 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 }}
24 changes: 9 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ lazy val root = (project in file("."))
ThisBuild / githubWorkflowPublishTargetBranches := List()
//scala fix isn't available for scala 3 so ensure we only run the fmt check
//using the latest scala 2.13
ThisBuild / githubWorkflowBuildPreamble := WorkflowJob(
"fmtCheck",
"Format",
List(
WorkflowStep.Run(List(s"sbt ++${Scala213} fmtCheck"), name = Some("Check formatting"))
),
scalas = List(Scala213)
).steps
ThisBuild / githubWorkflowBuildPreamble :=
WorkflowJob(
"fmtCheck",
"Format",
List(
WorkflowStep.Run(List(s"sbt ++${Scala213} fmtCheck"), name = Some("Check formatting")),
),
scalas = List(Scala213),
).steps

// Test Configuration
ThisBuild / libraryDependencies ++=
Expand All @@ -41,7 +42,6 @@ ThisBuild / testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
lazy val zhttp = (project in file("./zio-http"))
.settings(stdSettings("zhttp"))
.settings(
version := "1.0.0.0-RC13",
organization := "io.d11",
organizationName := "d11",
licenses += ("MIT License", new URL("https://github.com/dream11/zio-http/blob/master/LICENSE")),
Expand All @@ -65,12 +65,6 @@ lazy val zhttp = (project in file("./zio-http"))
new URL("https://github.com/amitksingh1490"),
),
),
publishMavenStyle in ThisBuild := true,
publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
libraryDependencies ++=
Seq(
"dev.zio" %% "zio" % zioVersion,
Expand Down
13 changes: 7 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.8")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scala3-migrate" % "0.3.1")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6")

0 comments on commit be78c94

Please sign in to comment.