From 1b178875b9eb6985a274b828b26e73a69481f470 Mon Sep 17 00:00:00 2001 From: Daniel Spiewak Date: Mon, 16 Nov 2020 15:14:30 -0700 Subject: [PATCH] Replaced `ComputeVar` implementation with the new variant --- src/main/scala/sbtghactions/WorkflowStep.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/sbtghactions/WorkflowStep.scala b/src/main/scala/sbtghactions/WorkflowStep.scala index ffe09da..3eef999 100644 --- a/src/main/scala/sbtghactions/WorkflowStep.scala +++ b/src/main/scala/sbtghactions/WorkflowStep.scala @@ -37,7 +37,9 @@ object WorkflowStep { val Tmate: WorkflowStep = Use("mxschmitt", "action-tmate", "v2", name = Some("Setup tmate session")) def ComputeVar(name: String, cmd: String): WorkflowStep = - Run(List(s"echo ::set-env name=$name::$$($cmd)"), name = Some(s"Export $name")) + Run( + List("echo \"" + name + "=$(" + cmd + ")\" >> $GITHUB_ENV"), + name = Some(s"Export $name")) final case class Run(commands: List[String], id: Option[String] = None, name: Option[String] = None, cond: Option[String] = None, env: Map[String, String] = Map()) extends WorkflowStep final case class Sbt(commands: List[String], id: Option[String] = None, name: Option[String] = None, cond: Option[String] = None, env: Map[String, String] = Map()) extends WorkflowStep