VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
552 stars 129 forks source link

Integrate with jitpack.io #775

Open armanbilge opened 2 years ago

armanbilge commented 2 years ago

Awesome that scala-cli is getting publishing capabilities!

Currently, one of the hardest parts of publishing is registering with Sonatype/Maven and creating a GPG key pair.

https://jitpack.io/ makes it even easier by letting you publish directly out of your GH repository.

resolvers += "jitpack" at "https://jitpack.io"
libraryDependencies += "com.github.User" % "Repo" % "Tag"

It currently only works with Gradle, Maven, Sbt and Leiningen according to https://docs.jitpack.io/building/

It would be really awesome if it could support scala-cli as well. Imagine if you can "publish" just by pointing jitpack to a scala-cli gist!

rmgk commented 2 years ago

Note that all that jitpack requires is that the process outputs jars to ~/.m2/repository and allows to specify custom commands, thus, adding a jitpack.yml with the following might work (maybe require some tweaking to the paths, and adding a scala-cli script):

install:
  - ./scala-cli publish --server=false --publish-repository ~/.m2/repository main.scala