Skip to content

VirtusLab/scala-cli-setup

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
This branch is 870 commits ahead of, 258 commits behind coursier/setup-action:refs/heads/main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

28971dc · Mar 6, 2025
Nov 27, 2024
Mar 6, 2025
Mar 6, 2025
Mar 15, 2021
Nov 9, 2020
Apr 27, 2022
Nov 9, 2020
Mar 15, 2021
Oct 26, 2020
Nov 20, 2023
Feb 16, 2024
Nov 22, 2024
Mar 5, 2025
Mar 5, 2025
Feb 16, 2024

Repository files navigation

Scala CLI setup GitHub Action

A GitHub Action to install Scala CLI.

Features

  • run it on any platform: Linux, MacOS, Windows
  • install any JVM you need
  • setup the build tool of your choice: sbt, mill, seed, etc.
  • install other common Scala CLI tools: Ammonite, Bloop, giter8, etc.

Inputs

  • scala-cli-version (optional): scala-cli version to install
    • "latest" to install the latest version.
  • jvm (optional): JVM to install
    • one of the options from cs java --available.
    • if left empty either the existing JVM will be used or Coursier will install its default JVM.
  • apps (optional): Scala apps to install (sbtn by default)
  • version (optional): Coursier version to install
    • This is defaulted to the latest stable release of Coursier
  • power (optional): Value for the --power launcher option
    • Necessary for using feature of scala-cli that require the --power option, like publishing.
    • Defaults to false

Environment variables

  • JAVA_HOME: path to the JVM to use
  • COURSIER_BIN_DIR: (optional) path to the directory where Coursier will install app binaries
    • defaults to $HOME/cs/bin
    • shouldn't have to be tampered with for vanilla GitHub action runners
    • make sure the directory is reachable for self-hosted runners
    • in case of issues, you can set it to something like
      env:
        COURSIER_BIN_DIR: ${{ github.workspace }}/cs/bin

Example with custom inputs

  steps:
    - uses: actions/checkout@v2
    - uses: VirtusLab/scala-cli-setup@main
      with:
        jvm: adopt:11
        apps: sbtn bloop ammonite

Outputs

  • cs-version: version of the installed Coursier (should be the latest available)
  • scala-cli-version: version of the installed Scala CLI (should be the latest available)

Caching

This action should work well with the official Coursier cache-action. For example:

  steps:
    - uses: actions/checkout@v2
    - uses: coursier/cache-action@v6
    - uses: VirtusLab/scala-cli-setup@main

About

▶️ Scala CLI setup GitHub Action

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 63.3%
  • JavaScript 36.7%