diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bf89b54aa..866cb22b5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: sbt: name: sbt publish runs-on: ubuntu-22.04 - if: github.repository == 'akka/akka-grpc' + if: github.event.repository.fork == false steps: - name: Checkout uses: actions/checkout@v3.1.0 @@ -58,7 +58,7 @@ jobs: documentation: name: Documentation runs-on: ubuntu-22.04 - if: github.repository == 'akka/akka-grpc' + if: github.event.repository.fork == false steps: - name: Checkout uses: actions/checkout@v3.1.0 @@ -66,9 +66,6 @@ jobs: # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves fetch-depth: 0 - - name: Cache Coursier cache - uses: coursier/cache-action@v6.4.0 - - name: Set up JDK 11 uses: coursier/setup-action@v1.3.0 with: @@ -77,9 +74,9 @@ jobs: - name: Publish run: |- eval "$(ssh-agent -s)" - echo $SCP_SECRET | base64 -d > /tmp/id_rsa - chmod 600 /tmp/id_rsa - ssh-add /tmp/id_rsa - sbt akka-grpc-docs/publishRsync + echo $AKKA_RSYNC_GUSTAV | base64 -d > .github/id_rsa + chmod 600 .github/id_rsa + ssh-add .github/id_rsa + sbt publishRsync env: - SCP_SECRET: ${{ secrets.SCP_SECRET }} + AKKA_RSYNC_GUSTAV: ${{ secrets.AKKA_RSYNC_GUSTAV }} diff --git a/RELEASING.md b/RELEASING.md index 0793668ad..fb3f3dd8f 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -5,8 +5,8 @@ Akka gRPC is released when there is a need for it. If you want to test an improvement that is not yet released, you can use a -snapshot version: we release all commits to main to the snapshot repository -on [Sonatype](https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/grpc). +snapshot version. We publish snapshot versions for every commit to the `main` branch. +Snapshot builds are available at https://repo.akka.io/snapshots. ## How to release diff --git a/project/Publish.scala b/project/Publish.scala index 7a0d70686..c3b8ae6e2 100644 --- a/project/Publish.scala +++ b/project/Publish.scala @@ -40,11 +40,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 { diff --git a/project/project-info.conf b/project/project-info.conf index 6a886bce9..aff909232 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -3,8 +3,8 @@ project-info { shared-info { jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"] snapshots: { - url: "https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/grpc/" - text: "Snapshots are available from Sonatype" + url: "https://repo.akka.io/snapshots" + text: "Akka library snapshot repository" } issues: { url: "https://github.com/akka/akka-grpc/issues"