|
1 |
| -Setup sbt |
2 |
| -========= |
| 1 | +Setup sbt has moved |
| 2 | +=================== |
3 | 3 |
|
4 | 4 | This action enables `sbt` runner from GitHub Actions.
|
5 | 5 |
|
6 |
| -Usage |
7 |
| ------ |
| 6 | +Since there's already another action called setup-sbt, I've copied this repo to a new name called [setup-sbt-runner](https://github.com/sbt/setup-sbt-runner). |
8 | 7 |
|
9 |
| -Here's an example usage of setup-sbt action. |
10 |
| - |
11 |
| -```yaml |
12 |
| -env: |
13 |
| - JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
14 |
| -steps: |
15 |
| -- uses: actions/checkout@v4 |
16 |
| -- name: Setup JDK |
17 |
| - uses: actions/setup-java@v4 |
18 |
| - with: |
19 |
| - distribution: temurin |
20 |
| - java-version: 17 |
21 |
| - cache: sbt |
22 |
| -- uses: sbt/setup-sbt@v1 |
23 |
| -- name: Build and test |
24 |
| - shell: bash |
25 |
| - run: sbt -v +test |
26 |
| -``` |
27 |
| -
|
28 |
| -`uses: sbt/setup-sbt@v1` makes `sbt` available on Linux, macOS, and Windows. |
29 |
| - |
30 |
| -### Setting the runner version |
31 |
| - |
32 |
| -The `sbt` runner (Bash script that launches sbt) is typically compatible with all modern sbt releases, |
33 |
| -you might want to pin the runner to a specific version. |
34 |
| - |
35 |
| -```yaml |
36 |
| -env: |
37 |
| - JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
38 |
| -steps: |
39 |
| -- uses: actions/checkout@v4 |
40 |
| -- name: Setup JDK |
41 |
| - uses: actions/setup-java@v4 |
42 |
| - with: |
43 |
| - distribution: temurin |
44 |
| - java-version: 17 |
45 |
| - cache: sbt |
46 |
| -- uses: sbt/setup-sbt@v1 |
47 |
| - with: |
48 |
| - sbt-runner-version: 1.9.9 |
49 |
| -- name: Build and test |
50 |
| - shell: bash |
51 |
| - run: sbt -v +test |
52 |
| -``` |
53 |
| - |
54 |
| -Why is this GitHub Action needed? |
55 |
| ---------------------------------- |
56 |
| - |
57 |
| -The runner images on GitHub Action has long included `sbt` runner script. The [initial commit on actions/runner-images](https://github.com/actions/runner-images/pull/96) contains `images/linux/scripts/installers/sbt.sh`. However, the situation has changed in May 2024 when GitHub released the runner image for `macos-13` and `macos-14`, users noticed that they were missing the `sbt` runner script. |
58 |
| - |
59 |
| -[actions/runner-images#9369](https://github.com/actions/runner-images/issues/9369) and [actions/runner-images#9837](https://github.com/actions/runner-images/issues/9837) confirmed that this was intentional: |
60 |
| - |
61 |
| -> Thank you for such detail request. But currently we have no plans to add `sbt` on `macOS-13`/`macOS-14`. |
62 |
| - |
63 |
| -Since GitHub Actions are extensible, we thought this providing a setup action would be convenient way to enable `sbt` again on all runner images. |
64 |
| - |
65 |
| -License |
66 |
| -------- |
67 |
| - |
68 |
| -The scripts and documentation in this project are released under the [MIT License](LICENSE). |
| 8 | +I'll likely keep this repo around since it's part of some `ci.yml`s. |
0 commit comments