diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8654cf6 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/build.sbt b/build.sbt index 752ba85..60e5fe4 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,5 @@ -import ReleaseTransformations._ +import ReleaseTransformations.* +import sbtversionpolicy.withsbtrelease.ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease lazy val baseSettings = Seq( scalaVersion := "2.13.11", @@ -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, @@ -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 ) ) diff --git a/project/plugins.sbt b/project/plugins.sbt index 198ab96..592fa9d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") diff --git a/sonatype.sbt b/sonatype.sbt index 77aaa1d..b3900bd 100644 --- a/sonatype.sbt +++ b/sonatype.sbt @@ -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" diff --git a/version.sbt b/version.sbt index ebd574d..a5f65fc 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.41-SNAPSHOT" +ThisBuild / version := "1.0.0-SNAPSHOT"