From e1be206c6a1971fd34588f995af2e603ce84206b Mon Sep 17 00:00:00 2001 From: Renato Cavalcanti Date: Mon, 29 Nov 2021 12:57:03 +0100 Subject: [PATCH 1/3] remove old bintray based publishing --- .travis.yml | 39 +++++++++++++++++++++++++++++++++++++++ RELEASING.md | 16 ++++++++++++++++ build.sbt | 5 +---- project/plugins.sbt | 25 ++++++------------------- 4 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 RELEASING.md diff --git a/.travis.yml b/.travis.yml index 989fae043..a17278389 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,45 @@ script: # Check that we can actually build and package the library - sbt ++$TRAVIS_SCALA_VERSION publishLocal + +jobs: + include: + - stage: test + name: "Validations" + script: sbt mimaReportBinaryIssues validateCode doc + env: + - TRAVIS_SCALA_VERSION=2.13.5 + - TRAVIS_JDK=11 + + - name: "Run tests with Scala 2.12 and AdoptOpenJDK 11" + env: + - TRAVIS_SCALA_VERSION=2.12.13 + - TRAVIS_JDK=11 + + - name: "Run tests with Scala 2.13 and AdoptOpenJDK 11" + env: + - TRAVIS_SCALA_VERSION=2.13.5 + - TRAVIS_JDK=11 + + - name: "Run tests with Scala 2.12 and AdoptOpenJDK 8" + env: + - TRAVIS_SCALA_VERSION=2.12.13 + - TRAVIS_JDK=8 + + - name: "Run tests with Scala 2.13 and AdoptOpenJDK 8" + env: + - TRAVIS_SCALA_VERSION=2.13.5 + - TRAVIS_JDK=8 + + - stage: publish + name: "Publish artifacts to Sonatype" + script: sbt +publish + +stages: + - name: test + - name: publish + if: (tag IS present) AND NOT fork + cache: directories: - "$HOME/.cache/coursier" diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 000000000..29e93ae30 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,16 @@ +## Releasing + +This is released from the `main` branch from `2.2.0` forward. Unless an older version needs patching, then it must be released from the maintenance branch, for instance `2.1.x` branch. If there is no maintenance branch for the release that needs patching, create it from the tag. + +## Cutting the release + +### Requires contributor access + +- Check the [draft release notes](https://github.com/playframework/play-ws/releases) to see if everything is there +- Wait until [main branch build finishes](https://travis-ci.com/github/playframework/play-ws/builds) after merging the last PR +- Update the [draft release](https://github.com/playframework/play-ws/releases) with the next tag version (eg. `2.2.0`), title and release description +- Check that Travis CI release build has executed successfully (Travis will start a [CI build](https://travis-ci.com/github/playframework/play-ws/builds) for the new tag and publish artifacts to Sonatype) + +### Check Maven Central + +- The artifacts will become visible at https://repo1.maven.org/maven2/com/typesafe/play/ diff --git a/build.sbt b/build.sbt index ddba8a4ca..2eda02584 100644 --- a/build.sbt +++ b/build.sbt @@ -424,10 +424,7 @@ lazy val bench = project lazy val root = project .in(file(".")) .settings( - name := "play-ws-standalone-root", - // otherwise same as orgname, and "sonatypeList" - // says "No staging profile is found for com.typesafe.play" - sonatypeProfileName := "com.typesafe" + name := "play-ws-standalone-root" ) .settings(commonSettings) .settings(formattingSettings) diff --git a/project/plugins.sbt b/project/plugins.sbt index 602299ab5..2fbd91573 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,26 +1,13 @@ + resolvers ++= DefaultOptions.resolvers(snapshot = true) resolvers += Resolver.typesafeRepo("releases") -// TODO remove when https://github.com/lightbend/mima/issues/422 is fixed -resolvers += Resolver.url( - "typesafe sbt-plugins", - url("https://dl.bintray.com/typesafe/sbt-plugins") -)(Resolver.ivyStylePatterns) - addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1") - addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0") - -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") - +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.0.0") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.12") - addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3") - -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1") - -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.3.1") - -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7") - -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.2") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") +addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") From 67c0fc29bb8894c0b7ffd8b1ad74ed0048b4df96 Mon Sep 17 00:00:00 2001 From: Renato Cavalcanti Date: Mon, 29 Nov 2021 12:59:48 +0100 Subject: [PATCH 2/3] remove unnecessary stages since already covered by matrix --- .travis.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index a17278389..b0917fccf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,26 +29,6 @@ jobs: - TRAVIS_SCALA_VERSION=2.13.5 - TRAVIS_JDK=11 - - name: "Run tests with Scala 2.12 and AdoptOpenJDK 11" - env: - - TRAVIS_SCALA_VERSION=2.12.13 - - TRAVIS_JDK=11 - - - name: "Run tests with Scala 2.13 and AdoptOpenJDK 11" - env: - - TRAVIS_SCALA_VERSION=2.13.5 - - TRAVIS_JDK=11 - - - name: "Run tests with Scala 2.12 and AdoptOpenJDK 8" - env: - - TRAVIS_SCALA_VERSION=2.12.13 - - TRAVIS_JDK=8 - - - name: "Run tests with Scala 2.13 and AdoptOpenJDK 8" - env: - - TRAVIS_SCALA_VERSION=2.13.5 - - TRAVIS_JDK=8 - - stage: publish name: "Publish artifacts to Sonatype" script: sbt +publish From 067e6f55fb46bcfa9e5d3c622b1a85b677a25b6f Mon Sep 17 00:00:00 2001 From: Renato Cavalcanti Date: Mon, 29 Nov 2021 15:15:13 +0100 Subject: [PATCH 3/3] commentted out publishing state --- .travis.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0917fccf..0c7ff8fea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,14 +29,17 @@ jobs: - TRAVIS_SCALA_VERSION=2.13.5 - TRAVIS_JDK=11 - - stage: publish - name: "Publish artifacts to Sonatype" - script: sbt +publish + # TODO: this is not yet working, we need new credentials in CI and test it out + # for now, releases from this branch must be done from maintainers machine + # - stage: publish + # name: "Publish artifacts to Sonatype" + # script: sbt +publish stages: - name: test - - name: publish - if: (tag IS present) AND NOT fork + # TODO: enable publish after fixing CI credentials + # - name: publish + # if: (tag IS present) AND NOT fork cache: directories: