Template for Polyvariant libraries: Scala 3, cross-built for JVM / JS / Native on sbt-typelevel, with CI, publishing, Scala Steward, and Mergify wired up.
- Click "Use this template" in GitHub's UI to create your repository.
- Rename the library everywhere it's referenced:
name := "library-template"inbuild.sbt- the
org.polyvariant.librarytemplatepackage and the sampleLibraryTemplateobject/test - this
README.md
- Adjust
build.sbt:tlBaseVersion,startYear,developers, and the set of cross platforms (JVMPlatform,JSPlatform,NativePlatform) you actually want to build. - Regenerate the GitHub Actions workflows after any build change:
(Mergify config regenerates via
sbt githubWorkflowGeneratesbt mergifyGenerate.) - Delete the sample
LibraryTemplatesource/test and start writing your library.
- sbt-typelevel — cross-building (JVM/JS/Native), MiMa binary-compatibility checks, header + scalafmt checks, and Sonatype publishing on tag.
- Generated CI (
.github/workflows/) — do not hand-edit; changebuild.sbtand rerunsbt githubWorkflowGenerate. - Scala Steward (
.scala-steward.conf) with a 7-day cooldown. - Mergify (
.mergify.yml) — auto-merges Steward's patch/minor PRs once CI is green.
Tag a release (git tag v0.1.0 && git push --tags); CI runs tlCiRelease. This needs the
usual sbt-typelevel secrets configured on the repo: PGP_SECRET, PGP_PASSPHRASE,
SONATYPE_USERNAME, SONATYPE_PASSWORD.
Apache 2.0.