Initial Commit
Some checks failed
Continuous Integration / GitHub Actions Test (push) Successful in 23s
CodeQL / Analyze (TypeScript) (push) Failing after 5m27s
Check Transpiled JavaScript / Check dist/ (push) Has been cancelled
Continuous Integration / TypeScript Tests (push) Has been cancelled
Lint Codebase / Lint Codebase (push) Has been cancelled
Some checks failed
Continuous Integration / GitHub Actions Test (push) Successful in 23s
CodeQL / Analyze (TypeScript) (push) Failing after 5m27s
Check Transpiled JavaScript / Check dist/ (push) Has been cancelled
Continuous Integration / TypeScript Tests (push) Has been cancelled
Lint Codebase / Lint Codebase (push) Has been cancelled
This commit is contained in:
21
src/main.ts
Normal file
21
src/main.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import * as core from '@actions/core'
|
||||
import { download, getLatestVersion } from './download'
|
||||
|
||||
/**
|
||||
* The main function for the action.
|
||||
* @returns {Promise<void>} Resolves when the action is complete.
|
||||
*/
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
let conanVersion: string = core.getInput('conan-version')
|
||||
|
||||
if (conanVersion === '') {
|
||||
conanVersion = await getLatestVersion()
|
||||
}
|
||||
|
||||
const path = await download(conanVersion)
|
||||
core.addPath(path)
|
||||
} catch (error) {
|
||||
if (error instanceof Error) core.setFailed(error.message)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user