Skip to content

Commit

Permalink
Merge pull request #179 from VirtusLab/update-scala-cli-setup
Browse files Browse the repository at this point in the history
Update ScalaCLI
  • Loading branch information
Gedochao committed Feb 22, 2023
2 parents 2d79233 + 3eb28d3 commit 579ee93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -20,6 +20,10 @@ inputs:
description: 'Coursier version to install'
required: false
default: ''
power:
description: 'Value for the --power launcher option'
required: false
default: 'false'
outputs:
cs-version:
description: 'Version of the installed Coursier'
Expand Down
9 changes: 8 additions & 1 deletion src/main.ts
Expand Up @@ -6,7 +6,7 @@ import * as tc from '@actions/tool-cache'

let csVersion = core.getInput('version')
if (!csVersion) csVersion = '2.1.0-M7-39-gb8f3d7532'
const scalaCLIVersion = '0.1.20'
const scalaCLIVersion = '0.2.0'

const coursierVersionSpec = csVersion

Expand Down Expand Up @@ -124,6 +124,13 @@ async function run(): Promise<void> {
)
}
})
await core.group('Config --power', async () => {
const powerInput = core.getInput('power').trim()
const isPower = powerInput === 'true'
if (isPower) {
await execOutput('scala-cli', 'config', 'power', 'true')
}
})
} catch (error: unknown) {
const msg = error instanceof Error ? error.message : String(error)
core.setFailed(msg)
Expand Down

0 comments on commit 579ee93

Please sign in to comment.