You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by md...@apache.org on 2023/01/25 12:10:24 UTC
[incubator-pekko] branch main updated: Publish nightlies to Apache Nexus Repository
This is an automated email from the ASF dual-hosted git repository.
mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 6f6815049b Publish nightlies to Apache Nexus Repository
6f6815049b is described below
commit 6f6815049b9c953a10bab67ad4d4db6190df7dc0
Author: Matthew de Detrich <ma...@aiven.io>
AuthorDate: Mon Jan 16 17:48:49 2023 +0100
Publish nightlies to Apache Nexus Repository
---
.github/workflows/publish-nightly.yml | 6 ++++++
project/Publish.scala | 28 ++++++++++++----------------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml
index 36a40d761e..6614ffd515 100644
--- a/.github/workflows/publish-nightly.yml
+++ b/.github/workflows/publish-nightly.yml
@@ -48,6 +48,12 @@ jobs:
with:
java-version: adopt@1.11
+ - name: Publish to Apache Maven repo
+ env:
+ NEXUS_USER: ${{ secrets.NEXUS_USER }}
+ NEXUS_PW: ${{ secrets.NEXUS_PW }}
+ run: sbt +publish
+
- name: Publish local
run: |-
sudo apt-get install graphviz
diff --git a/project/Publish.scala b/project/Publish.scala
index f9e05a13f8..78187f2b77 100644
--- a/project/Publish.scala
+++ b/project/Publish.scala
@@ -15,20 +15,17 @@ package org.apache.pekko
import sbt._
import sbt.Keys._
-import java.io.File
import com.lightbend.sbt.publishrsync.PublishRsyncPlugin.autoImport.publishRsyncHost
import xerial.sbt.Sonatype.autoImport.sonatypeProfileName
object Publish extends AutoPlugin {
- val defaultPublishTo = settingKey[File]("Default publish directory")
-
override def trigger = allRequirements
override lazy val projectSettings = Seq(
- publishTo := Some(akkaPublishTo.value),
+ publishTo := Some(pekkoPublishTo.value),
publishRsyncHost := "akkarepo@gustav.akka.io",
- credentials ++= akkaCredentials,
+ credentials ++= apacheNexusCredentials,
organizationName := "Apache Software Foundation",
organizationHomepage := Some(url("https://www.apache.org")),
sonatypeProfileName := "org.apache.pekko",
@@ -40,23 +37,22 @@ object Publish extends AutoPlugin {
"dev@pekko.apache.org",
url("https://github.com/apache/incubator-pekko/graphs/contributors"))),
publishMavenStyle := true,
- pomIncludeRepository := { x =>
- false
- },
- defaultPublishTo := target.value / "repository")
+ pomIncludeRepository := (_ => false))
- private def akkaPublishTo = Def.setting {
- val key = new java.io.File(
- Option(System.getProperty("pekko.gustav.key"))
- .getOrElse(System.getProperty("user.home") + "/.ssh/id_rsa_gustav.pem"))
+ private def pekkoPublishTo = Def.setting {
if (isSnapshot.value)
- Resolver.sftp("Akka snapshots", "gustav.akka.io", "/home/akkarepo/www/snapshots").as("akkarepo", key)
+ "apache-snapshots".at("https://repository.apache.org/content/repositories/snapshots")
else
Opts.resolver.sonatypeStaging
}
- private def akkaCredentials: Seq[Credentials] =
- Option(System.getProperty("pekko.publish.credentials")).map(f => Credentials(new File(f))).toSeq
+ private def apacheNexusCredentials: Seq[Credentials] =
+ (sys.env.get("NEXUS_USER"), sys.env.get("NEXUS_PW")) match {
+ case (Some(user), Some(password)) =>
+ Seq(Credentials("Apache Nexus Repository Manager", "repository.apache.org", user, password))
+ case _ =>
+ Seq.empty
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org