diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b467cc61f..3396d1b63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,47 +49,27 @@ jobs: run: sbt +publishSigned documentation: - # runs on main repo only - if: github.repository == 'akka/akka-projection' name: Documentation - # the release environment provides access to secrets required in the release process - # https://github.com/akka/akka-projection/settings/environments - environment: release runs-on: ubuntu-22.04 + if: github.event.repository.fork == false steps: - name: Checkout - # https://github.com/actions/checkout/releases - # v3.3.0 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@v3.1.0 with: # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves fetch-depth: 0 - - name: Checkout GitHub merge - if: github.event.pull_request - run: |- - git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch - git checkout scratch - - - name: Cache Coursier cache - # https://github.com/coursier/cache-action/releases - # v6.4.3 - uses: coursier/cache-action@d1039466d0812d6370649b9afb02bbf5f646bacf - - name: Set up JDK 11 - # https://github.com/coursier/setup-action/releases - # v1.3.0 - uses: coursier/setup-action@70323223454ac2a9eb2de46f389b4d045cbcdea5 + uses: coursier/setup-action@v1.3.0 with: - jvm: temurin:1.11.0 + jvm: temurin:1.11 - - name: Publish API and reference documentation - env: - GUSTAV_KEY: ${{ secrets.GUSTAV_KEY }} - GUSTAV_PASSPHRASE: ${{ secrets.GUSTAV_PASSPHRASE }} - run: |+ + - name: Publish + run: |- eval "$(ssh-agent -s)" - echo $GUSTAV_KEY | base64 -di > .github/id_rsa + echo $AKKA_RSYNC_GUSTAV | base64 -d > .github/id_rsa chmod 600 .github/id_rsa ssh-add .github/id_rsa - sbt "docs/publishRsync; akka-distributed-cluster-docs/publishRsync; akka-edge-docs/publishRsync" + sbt publishRsync + env: + AKKA_RSYNC_GUSTAV: ${{ secrets.AKKA_RSYNC_GUSTAV }} diff --git a/docs/src/main/paradox/snapshots.md b/docs/src/main/paradox/snapshots.md index c7d00e210..24b8a0f17 100644 --- a/docs/src/main/paradox/snapshots.md +++ b/docs/src/main/paradox/snapshots.md @@ -1,12 +1,9 @@ --- -project.description: Snapshot builds of Akka Projection are provided via the Sonatype snapshot repository. +project.description: Snapshot builds of Akka Projection. --- # Snapshots -[snapshots-badge]: https://img.shields.io/nexus/s/com.lightbend.akka/akka-projection-core_2.13?server=https%3A%2F%2Foss.sonatype.org -[snapshots]: https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/akka-projection-core_2.13/ - -Snapshots are published to the Sonatype Snapshot repository after every successful build on main. +Snapshots are published to https://repo.akka.io/snapshots repository after every successful build on main. Add the following to your project build definition to resolve Akka Projection's snapshots: ## Configure repository @@ -15,37 +12,34 @@ Maven : ```xml ... - - - snapshots-repo - Sonatype snapshots - https://oss.sonatype.org/content/repositories/snapshots - - + + + + akka-repository + Akka library snapshot repository + https://repo.akka.io/snapshots + + + ... ``` sbt : ```scala - resolvers += Resolver.sonatypeRepo("snapshots") + resolvers += "Akka library snapshot repository".at("https://repo.akka.io/snapshots") ``` Gradle : ```gradle repositories { maven { - url "https://oss.sonatype.org/content/repositories/snapshots" + url "https://repo.akka.io/snapshots" } } ``` + ## Documentation The [snapshot documentation](https://doc.akka.io/docs/akka-projection/snapshot) is updated with every snapshot build. - -## Versions - -Latest published snapshot version is [![snapshots-badge][]][snapshots] - -The snapshot repository is cleaned from time to time with no further notice. Check [Sonatype snapshots Akka Projection files](https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/) to see what versions are currently available. diff --git a/project/AkkaSnapshotRepository.scala b/project/AkkaSnapshotRepository.scala index e42bc0baf..cefaf665a 100644 --- a/project/AkkaSnapshotRepository.scala +++ b/project/AkkaSnapshotRepository.scala @@ -14,8 +14,7 @@ object AkkaSnapshotRepositories extends AutoPlugin { .get("build.akka.version") .orElse(sys.props.get("build.alpakka.kafka.version")) match { case Some(_) => - // akka and alpakka-kafka use Sonatype's snapshot repo - Resolver.sonatypeOssRepos("snapshots") + Seq("Akka library snapshot repository".at("https://repo.akka.io/snapshots")) case None => Seq.empty }) } diff --git a/project/Publish.scala b/project/Publish.scala index b8ec58f43..a2ec2b2d8 100644 --- a/project/Publish.scala +++ b/project/Publish.scala @@ -43,11 +43,12 @@ object Publish extends AutoPlugin { sonatypeProfileName := "com.lightbend", beforePublishTask := beforePublish(isSnapshot.value), publishSigned := publishSigned.dependsOn(beforePublishTask).value, - publishTo := (if (isSnapshot.value) - Some(Resolver.file("file", target.value / "repository")) // FIXME snapshot repo - else - Some("Cloudsmith API".at("https://maven.cloudsmith.io/lightbend/akka/"))), - credentials ++= (if (isSnapshot.value) Seq[Credentials]() else cloudsmithCredentials(validate = false))) + publishTo := + (if (isSnapshot.value) + Some("Cloudsmith API".at("https://maven.cloudsmith.io/lightbend/akka-snapshots/")) + else + Some("Cloudsmith API".at("https://maven.cloudsmith.io/lightbend/akka/"))), + credentials ++= cloudsmithCredentials(validate = false)) def cloudsmithCredentials(validate: Boolean): Seq[Credentials] = { (sys.env.get("PUBLISH_USER"), sys.env.get("PUBLISH_PASSWORD")) match {