Skip to content

Conversation

@armanbilge
Copy link
Member

@armanbilge armanbilge commented Jun 23, 2022

Migrates the build infrastructure to sbt-typelevel, which was largely derived from sbt-spiewak but has better support for Scala.js projects.

https://typelevel.org/sbt-typelevel/

Fixes #33. Fixes #43.
Closes #41. Closes #47.

addCommandAlias("ci", ciVariants.mkString("; ", "; ", ""))

addCommandAlias("ciNode", "; set Global / useJSEnv := JSEnv.NodeJS; test; core/doc")
addCommandAlias("ciNode", "; set Global / useJSEnv := JSEnv.NodeJS; test; core/doc; core/mimaReportBinaryIssues; headerCheckAll")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now check binary-compatibility and copyright headers in CI.

Comment on lines -76 to -78
enablePlugins(SonatypeCiReleasePlugin)

ThisBuild / spiewakMainBranches := Seq("main")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-typelevel enables these by default.

Comment on lines -81 to -93
// we can remove this once we have a non-password-protected key in the secrets
ThisBuild / githubWorkflowPublishPreamble := Seq(
WorkflowStep.Run(
List(
"echo \"$PGP_SECRET\" | base64 -d > /tmp/signing-key.gpg",
"echo \"$PGP_PASSPHRASE\" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg"),
name = Some("Import signing key"),
env = Map("PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}")),

WorkflowStep.Run(
List("(echo \"$PGP_PASSPHRASE\"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase 5EBC14B0F6C55083"),
name = Some("Strip passphrase from signing key"),
env = Map("PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}")))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-typelevel has integrated "support" for passphrase-protected keys (actually, it just uses this same hack 😛 )

@djspiewak djspiewak merged commit 0f15436 into scala-js:main Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants