From 4d817a2dcc955650fed4a412e0ea3f07cdd4f29d Mon Sep 17 00:00:00 2001 From: Jeff May Date: Fri, 30 Sep 2022 18:52:54 -0700 Subject: [PATCH] Update ci workflow to publish tags on release --- .github/workflows/ci.yml | 7 ++++++- build.sbt | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0f55fb2..ef07d282 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,4 +111,9 @@ jobs: tar xf targets.tar rm targets.tar - - run: sbt ++${{ matrix.scala }} ci-release + - env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + run: sbt ++${{ matrix.scala }} ci-release diff --git a/build.sbt b/build.sbt index 0eb198c1..a6d6219d 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,17 @@ publish / skip := true // SBT CI Release Plugin ThisBuild / githubWorkflowTargetTags ++= Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) -ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))) +ThisBuild / githubWorkflowPublish := Seq( + WorkflowStep.Sbt( + List("ci-release"), + env = Map( + "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", + "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", + "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", + "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}", + ), + ), +) def commonProject( dir: String,