From c3068bc3e70ee0b1917646c1cdcf72cb0dbffdb6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 26 Feb 2025 15:51:27 +0000 Subject: [PATCH] Use setup-sbt in publish workflow --- .github/workflows/ci.yml | 3 +++ build.sbt | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb4dcb7..4c94d84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,6 +139,9 @@ jobs: echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Publish run: sbt tlCiRelease diff --git a/build.sbt b/build.sbt index 74e91f1..d00d080 100644 --- a/build.sbt +++ b/build.sbt @@ -44,11 +44,13 @@ ThisBuild / scmInfo := Some( ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.16", "2.13.7", "3.1.3") +val setupSbt = WorkflowStep.Use( + UseRef.Public("sbt", "setup-sbt", "v1"), + name = Some("Setup sbt") +) + ThisBuild / githubWorkflowBuildPreamble ++= Seq( - WorkflowStep.Use( - UseRef.Public("sbt", "setup-sbt", "v1"), - name = Some("Setup sbt") - ), + setupSbt, WorkflowStep.Use( UseRef.Public("actions", "setup-node", "v3"), name = Some("Setup NodeJS v18 LTS"), @@ -62,6 +64,8 @@ ThisBuild / githubWorkflowBuildPreamble ++= Seq( ), ) +ThisBuild / githubWorkflowPublishPreamble += setupSbt + val ciVariants = List("ciNode", "ciFirefox", "ciChrome", "ciJSDOMNodeJS") ThisBuild / githubWorkflowBuildMatrixAdditions += "ci" -> ciVariants