diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e37cde..5a56602 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,17 +122,13 @@ jobs: - name: Publish artifacts to Sonatype env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} run: sbt --client '++${{ matrix.scala }}; ci-release' - - uses: christopherdavenport/create-ghpages-ifnotexists@v1 - - - name: Publish microsite - run: sbt --client '++${{ matrix.scala }}; site/publishMicrosite' - - name: Publish artifacts to npm env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/build.sbt b/build.sbt index 7a29b42..8a94b9c 100644 --- a/build.sbt +++ b/build.sbt @@ -33,7 +33,26 @@ ThisBuild / githubWorkflowPublishPreamble ++= Seq( ) ) -ThisBuild / githubWorkflowPublish ++= Seq( +ThisBuild / githubWorkflowPublish := Seq( + WorkflowStep.Sbt( + List("ci-release"), + name = Some("Publish artifacts to Sonatype"), + env = Map( + "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", + "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", + "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", + "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}", + "NPM_TOKEN" -> "${{ secrets.NPM_TOKEN }}", // Here because when we start thin client need env in scope so it can be reused for package publish + ) + ), + WorkflowStep.Use(UseRef.Public("christopherdavenport", "create-ghpages-ifnotexists", "v1")), + WorkflowStep.Sbt( + List("site/publishMicrosite"), + name = Some("Publish microsite"), + env = Map( + "NPM_TOKEN" -> "${{ secrets.NPM_TOKEN }}" + ) + ), WorkflowStep.Sbt( List("npmPackageNpmrc", "npmPackagePublish"), name = Some("Publish artifacts to npm"),