Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt GHA Scala Library Release Workflow #208

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Comment on lines +12 to +13
Copy link
Member Author

@rtyley rtyley Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These GitHub Organisation Secrets are granted to this repo by https://github.com/guardian/github-secret-access/pull/18.

42 changes: 21 additions & 21 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
import ReleaseTransformations.*
import Dependencies.*
import sbtversionpolicy.withsbtrelease.ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease
import xerial.sbt.Sonatype.*

name := "play-googleauth"

ThisBuild / scalaVersion := "2.13.12"

val sonatypeReleaseSettings = Seq(
val artifactPomMetadataSettings = Seq(
organization := "com.gu.play-googleauth",

description := "Simple Google authentication module for Play 2 & 3",

licenses := Seq("Apache V2" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")),
licenses := Seq("Apache V2" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")),

sonatypeProjectHosting :=
Some(GitHubHosting("guardian", "play-googleauth", "[email protected]"))

releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
)

def projectWithPlayVersion(playVersion: PlayVersion) =
Expand All @@ -44,7 +33,7 @@ def projectWithPlayVersion(playVersion: PlayVersion) =
"software.amazon.awssdk" % "ssm" % "2.21.35" % Test
) ++ googleDirectoryAPI ++ playVersion.playLibs,

sonatypeReleaseSettings
artifactPomMetadataSettings
)

lazy val `play-v27` = projectWithPlayVersion(PlayVersion.V27)
Expand All @@ -58,8 +47,19 @@ lazy val `play-googleauth-root` = (project in file(".")).aggregate(
`play-v29`,
`play-v30`
).settings(
publishArtifact := false,
publish / skip := true,

sonatypeReleaseSettings
releaseVersion := fromAggregatedAssessedCompatibilityWithLatestRelease().value,
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion
)
)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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.10.0")
19 changes: 0 additions & 19 deletions sonatype.sbt

This file was deleted.

Loading