Skip to content

polyvariant/library-template

Repository files navigation

library-template

Template for Polyvariant libraries: Scala 3, cross-built for JVM / JS / Native on sbt-typelevel, with CI, publishing, Scala Steward, and Mergify wired up.

Using this template

  1. Click "Use this template" in GitHub's UI to create your repository.
  2. Rename the library everywhere it's referenced:
    • name := "library-template" in build.sbt
    • the org.polyvariant.librarytemplate package and the sample LibraryTemplate object/test
    • this README.md
  3. Adjust build.sbt: tlBaseVersion, startYear, developers, and the set of cross platforms (JVMPlatform, JSPlatform, NativePlatform) you actually want to build.
  4. Regenerate the GitHub Actions workflows after any build change:
    sbt githubWorkflowGenerate
    
    (Mergify config regenerates via sbt mergifyGenerate.)
  5. Delete the sample LibraryTemplate source/test and start writing your library.

What's included

  • 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; change build.sbt and rerun sbt 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.

Publishing

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.

License

Apache 2.0.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages