Skip to content

Commit

Permalink
Enable Java, Only JS for NPM steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport committed Nov 20, 2021
1 parent 05c9d26 commit dc6560d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
run: sbt --client '++${{ matrix.scala }}; githubWorkflowCheck'

- name: Install artifacts to npm
run: sbt --client '++${{ matrix.scala }}; test; npmPackageInstall'
run: sbt --client '++${{ matrix.scala }}; test; coreJS/npmPackageInstall'

publish:
name: Publish Artifacts
Expand Down Expand Up @@ -120,7 +120,20 @@ jobs:
with:
node-version: 14

- name: Publish artifacts to Sonatype
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
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 }}
run: sbt --client '++${{ matrix.scala }}; npmPackageNpmrc; npmPackagePublish'
run: sbt --client '++${{ matrix.scala }}; coreJS/npmPackageNpmrc; coreJS/npmPackagePublish'
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ThisBuild / githubWorkflowBuildPreamble ++= Seq(WorkflowStep.Use(

ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(
List("test", "npmPackageInstall"),
List("test", "coreJS/npmPackageInstall"),
name = Some("Install artifacts to npm"),
)
)
Expand All @@ -33,9 +33,9 @@ ThisBuild / githubWorkflowPublishPreamble ++= Seq(
)
)

ThisBuild / githubWorkflowPublish := Seq(
ThisBuild / githubWorkflowPublish ++= Seq(
WorkflowStep.Sbt(
List("npmPackageNpmrc", "npmPackagePublish"),
List("coreJS/npmPackageNpmrc", "coreJS/npmPackagePublish"),
name = Some("Publish artifacts to npm"),
env = Map(
"NPM_TOKEN" -> "${{ secrets.NPM_TOKEN }}" // https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow#set-the-token-as-an-environment-variable-on-the-cicd-server
Expand Down

0 comments on commit dc6560d

Please sign in to comment.