Skip to content

Commit

Permalink
feat: make it cross-platform (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic authored Nov 10, 2020
1 parent 2e799d5 commit b8d24eb
Show file tree
Hide file tree
Showing 9 changed files with 3,808 additions and 108 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ on: [push]

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
jvm: ['', 'openjdk:11']
steps:
- uses: actions/checkout@v2
# create an sbt file to enabling sbt caching
- run: echo 'name := "foo"' > build.sbt
- id: cs-setup
uses: ./
with:
# jvm: 11
jvm: ${{ matrix.jvm }}
apps: sbt sbtn ammonite bloop
# - uses: coursier/cache-action@v5
- run: echo cs-version=${{ steps.cs-setup.outputs.cs-version }}
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": false,
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ It can be useful if you want to install a specific version of JVM or use a build

Inspired by [olafurpg/setup-scala](https://github.com/olafurpg/setup-scala) and the blog post [Single command Scala setup](https://alexarchambault.github.io/posts/2020-09-21-cs-setup.html) by Alex Archambault (author of Coursier).

## Features

- run it on any platform: Linux, MacOS, Windows
- install [any JVM](https://get-coursier.io/docs/cli-java.html#jvm-index) you need
- setup the build tool of your choice: sbt, mill, seed, etc.
- install other common Scala CLI tools: Ammonite, Bloop, giter8, [etc.](https://github.com/coursier/apps/tree/master/apps/resources)

## Inputs

- `jvm` (optional): JVM to install
Expand All @@ -14,6 +21,17 @@ Inspired by [olafurpg/setup-scala](https://github.com/olafurpg/setup-scala) and
- `apps` (optional): Scala apps to install (`sbtn` by default)
- space separated list of app names (from the [main channel](https://github.com/coursier/apps))

### Example with custom inputs

```yml
steps:
- uses: actions/checkout@v2
- uses: laughedelic/coursier-setup@v1
with:
jvm: adopt:11
apps: sbtn bloop ammonite
```
## Outputs
- `cs-version`: version of the installed Coursier (should be the latest available)
Expand Down
Loading

0 comments on commit b8d24eb

Please sign in to comment.