Skip to content

Commit f1cb6bd

Browse files
authored
Merge pull request #133 from Gedochao/sync-upstream
Merge upstream changes
2 parents 0788dc8 + e718531 commit f1cb6bd

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,31 @@ jobs:
1717
jvm: ['11', 'temurin:17']
1818
steps:
1919
- uses: actions/checkout@v3
20-
- run: |
20+
21+
- name: Build
22+
shell: bash -l {0}
23+
run: |
24+
nvm use lts/gallium
2125
npm install
22-
- run: |
2326
npm run all
27+
2428
# create an sbt file to enabling sbt caching
2529
- run: echo 'name := "foo"' > build.sbt
2630
- id: scala-cli-setup
2731
uses: ./
2832
with:
2933
jvm: ${{ matrix.jvm }}
3034
apps: sbt sbtn ammonite bloop:1.4.11
35+
3136
# - uses: coursier/cache-action@v5
3237
- run: echo cs-version=${{ steps.scala-cli-setup.outputs.cs-version }}
3338
- run: echo $PATH
39+
3440
# test Java
3541
- run: echo $JAVA_HOME
3642
- run: java -version
3743
- run: cs java -version
44+
3845
# test installed apps
3946
- run: sbtn.bat show name </dev/null
4047
shell: bash

.github/workflows/update-dist.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ jobs:
1111
- uses: actions/checkout@v3
1212
with:
1313
ssh-key: ${{ secrets.SCALA_CLI_SETUP_INTERNAL_KEY }}
14-
- run: npm install
15-
- run: npm run all
14+
- name: Build
15+
shell: bash -l {0}
16+
run: |
17+
nvm use lts/gallium
18+
npm install
19+
npm run all
20+
1621
- name: Create Pull Request
1722
id: cpr
1823
uses: peter-evans/create-pull-request@v4
@@ -21,6 +26,7 @@ jobs:
2126
author: GitHub <noreply@github.com>
2227
delete-branch: true
2328
title: Update dist
29+
2430
- name: Check Pull Request
2531
run: |
2632
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"

dist/index.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from 'path'
55
import * as tc from '@actions/tool-cache'
66

77
let csVersion = core.getInput('version')
8-
if (!csVersion) csVersion = '2.1.0-M6-49-gff26f8e39'
8+
if (!csVersion) csVersion = '2.1.0-M7-39-gb8f3d7532'
99
const scalaCLIVersion = '0.1.18'
1010

1111
const coursierVersionSpec = csVersion
@@ -124,8 +124,9 @@ async function run(): Promise<void> {
124124
)
125125
}
126126
})
127-
} catch (error: any) {
128-
core.setFailed(error.message)
127+
} catch (error: unknown) {
128+
const msg = error instanceof Error ? error.message : String(error)
129+
core.setFailed(msg)
129130
}
130131
}
131132

0 commit comments

Comments
 (0)