-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt GHA-Scala-Library-Release-Workflow
https://github.com/guardian/gha-scala-library-release-workflow gives us an automated way to publish releases of this library without needing individual Sonatype credentials for each developer! See also the list of Guardian projects that have adopted this workflow so far: guardian/gha-scala-library-release-workflow#20
- Loading branch information
Showing
5 changed files
with
22 additions
and
50 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,12 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
uses: guardian/gha-scala-library-release-workflow/.github/workflows/reusable-release.yml@main | ||
permissions: { contents: write, pull-requests: write } | ||
secrets: | ||
SONATYPE_PASSWORD: ${{ secrets.AUTOMATED_MAVEN_RELEASE_SONATYPE_PASSWORD }} | ||
PGP_PRIVATE_KEY: ${{ secrets.AUTOMATED_MAVEN_RELEASE_PGP_SECRET }} |
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,4 +1,5 @@ | ||
import sbtrelease.ReleaseStateTransformations._ | ||
import sbtversionpolicy.withsbtrelease.ReleaseVersion | ||
|
||
name:="cross-platform-navigation" | ||
|
||
|
@@ -19,51 +20,13 @@ Test / unmanagedResourceDirectories += baseDirectory.value / "json" | |
|
||
enablePlugins(BuildInfoPlugin) | ||
|
||
def listJsonFiles(file: File) : List[File] = { | ||
if(file.isDirectory) { | ||
file.listFiles().toList.flatMap(listJsonFiles) | ||
} else { | ||
List(file) | ||
} | ||
} | ||
|
||
def listJsonFilesInJsonDir: List[(File, String)] = { | ||
|
||
val jsonFilesDir = file("json") | ||
val jsonDir = jsonFilesDir.getAbsoluteFile.toPath.getParent | ||
|
||
listJsonFiles(jsonFilesDir).map { | ||
file => file -> jsonDir.relativize(file.getAbsoluteFile.toPath).toString | ||
} | ||
} | ||
|
||
publishTo := sonatypePublishToBundle.value | ||
publishMavenStyle := true | ||
Test / publishArtifact := false | ||
pomIncludeRepository := {_ => false} | ||
description := "Provides scala representation of the navigation menus for the www.theguardian.com and guardian apps" | ||
|
||
pomExtra in Global := { | ||
<url>https://github.com/guardian/cross-platform-navigation</url> | ||
<developers> | ||
<developer> | ||
<id>@guardian</id> | ||
<name>The guardian</name> | ||
<url>https://github.com/guardian</url> | ||
</developer> | ||
</developers> | ||
} | ||
|
||
|
||
//PgpPublis | ||
organization := "com.gu" | ||
licenses := Seq("Apache v2" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")) | ||
scmInfo := Some(ScmInfo( | ||
url("https://github.com/guardian/cross-platform-navigation"), | ||
"scm:git:[email protected]:guardian/cross-platform-navigation.git" | ||
)) | ||
licenses := Seq(License.Apache2) | ||
scalacOptions ++= Seq("-deprecation", "-unchecked", "-release:11") | ||
releaseCrossBuild := true | ||
releaseVersion := ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease().value | ||
releaseProcess := Seq( | ||
checkSnapshotDependencies, | ||
inquireVersions, | ||
|
@@ -72,11 +35,8 @@ releaseProcess := Seq( | |
setReleaseVersion, | ||
commitReleaseVersion, | ||
tagRelease, | ||
releaseStepCommandAndRemaining("+publishSigned"), | ||
releaseStepCommand("sonatypeBundleRelease"), | ||
setNextVersion, | ||
commitNextVersion, | ||
pushChanges | ||
commitNextVersion | ||
) | ||
|
||
Test/testOptions += Tests.Argument( | ||
|
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 +1 @@ | ||
sbt.version=1.9.0 | ||
sbt.version=1.9.8 |
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,8 +1,8 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") | ||
|
||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") | ||
|
||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") | ||
|
||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.0") | ||
|
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 +1 @@ | ||
ThisBuild / version := "1.3-SNAPSHOT" | ||
ThisBuild / version := "1.3.0-SNAPSHOT" |