Skip to content

Commit

Permalink
Merge remote-tracking branch 'coursier/main' into sync-upstream
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/release.yml
#	.github/workflows/update-dist.yml
#	dist/index.js
#	dist/index.js.map
#	package-lock.json
#	package.json
#	src/main.ts
  • Loading branch information
Gedochao committed Dec 8, 2022
2 parents 0788dc8 + ba59fe1 commit e718531
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -17,24 +17,31 @@ jobs:
jvm: ['11', 'temurin:17']
steps:
- uses: actions/checkout@v3
- run: |

- name: Build
shell: bash -l {0}
run: |
nvm use lts/gallium
npm install
- run: |
npm run all
# create an sbt file to enabling sbt caching
- run: echo 'name := "foo"' > build.sbt
- id: scala-cli-setup
uses: ./
with:
jvm: ${{ matrix.jvm }}
apps: sbt sbtn ammonite bloop:1.4.11

# - uses: coursier/cache-action@v5
- run: echo cs-version=${{ steps.scala-cli-setup.outputs.cs-version }}
- run: echo $PATH

# test Java
- run: echo $JAVA_HOME
- run: java -version
- run: cs java -version

# test installed apps
- run: sbtn.bat show name </dev/null
shell: bash
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/update-dist.yml
Expand Up @@ -11,8 +11,13 @@ jobs:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.SCALA_CLI_SETUP_INTERNAL_KEY }}
- run: npm install
- run: npm run all
- name: Build
shell: bash -l {0}
run: |
nvm use lts/gallium
npm install
npm run all
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
Expand All @@ -21,6 +26,7 @@ jobs:
author: GitHub <noreply@github.com>
delete-branch: true
title: Update dist

- name: Check Pull Request
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
Expand Down
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/main.ts
Expand Up @@ -5,7 +5,7 @@ import * as path from 'path'
import * as tc from '@actions/tool-cache'

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

const coursierVersionSpec = csVersion
Expand Down Expand Up @@ -124,8 +124,9 @@ async function run(): Promise<void> {
)
}
})
} catch (error: any) {
core.setFailed(error.message)
} catch (error: unknown) {
const msg = error instanceof Error ? error.message : String(error)
core.setFailed(msg)
}
}

Expand Down

0 comments on commit e718531

Please sign in to comment.