Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
anchor

GitHub Action

coursier-setup-action

v1.2.0-M3 Pre-release

coursier-setup-action

anchor

coursier-setup-action

Use Coursier to install JVM and Scala apps

Installation

Copy and paste the following snippet into your .yml file.

              

- name: coursier-setup-action

uses: coursier/setup-action@v1.2.0-M3

Learn more about this action in coursier/setup-action

Choose a version

Coursier setup GitHub Action

A GitHub Action to install Coursier and use it to install Java and Scala CLI tools.

It can be useful if you want to install a specific version of JVM or use a build tool like mill or seed.

Inspired by olafurpg/setup-scala and the blog post Single command Scala setup by Alex Archambault (author of Coursier).

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

  • 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)

Example with custom inputs

  steps:
    - uses: actions/checkout@v2
    - uses: coursier/setup-action@v1
      with:
        jvm: adopt:11
        apps: sbtn bloop ammonite

Outputs

  • cs-version: version of the installed Coursier (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: coursier/setup-action@v1