Skip to content

Commit

Permalink
Merge pull request #416 from guardian/adopt-GHA-Scala-Library-Release…
Browse files Browse the repository at this point in the history
…-Workflow

Adopt GHA Scala Library Release Workflow
  • Loading branch information
rtyley authored Dec 5, 2023
2 parents 22b3192 + 058d62a commit 19064e7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
uses: guardian/gha-scala-library-release-workflow/.github/workflows/reusable-release.yml@main
permissions:
contents: write
secrets:
AUTOMATED_MAVEN_RELEASE_PGP_SECRET: ${{ secrets.AUTOMATED_MAVEN_RELEASE_PGP_SECRET }}
AUTOMATED_MAVEN_RELEASE_SONATYPE_PASSWORD: ${{ secrets.AUTOMATED_MAVEN_RELEASE_SONATYPE_PASSWORD }}
14 changes: 5 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ReleaseTransformations._
import ReleaseTransformations.*
import sbtversionpolicy.withsbtrelease.ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease

lazy val baseSettings = Seq(
scalaVersion := "2.13.11",
Expand Down Expand Up @@ -86,9 +87,8 @@ lazy val `play-secret-rotation-root` = (project in file("."))
`aws-parameterstore-lambda`
)
.settings(baseSettings).settings(
publishArtifact := false,
publish := {},
publishLocal := {},
publish / skip := true,
releaseVersion := fromAggregatedAssessedCompatibilityWithLatestRelease().value,
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
Expand All @@ -98,11 +98,7 @@ lazy val `play-secret-rotation-root` = (project in file("."))
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
commitNextVersion
)
)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.1.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")

Expand Down
4 changes: 0 additions & 4 deletions sonatype.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
sonatypeProfileName := "com.gu"

ThisBuild / publishTo := sonatypePublishToBundle.value

ThisBuild / scmInfo := Some(ScmInfo(
url("https://github.com/guardian/play-secret-rotation"),
"scm:git:git@github.com:guardian/play-secret-rotation.git"
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "0.41-SNAPSHOT"
ThisBuild / version := "1.0.0-SNAPSHOT"

0 comments on commit 19064e7

Please sign in to comment.