setup-rust-action/src/main.ts

18 lines
315 B
TypeScript
Raw Normal View History

2019-08-15 17:16:59 +00:00
import * as core from '@actions/core';
2019-08-15 18:12:08 +00:00
import * as rustup from './rustup';
import * as os from 'os';
2019-08-15 17:16:59 +00:00
async function run() {
try {
2019-08-15 18:12:08 +00:00
const version = core.getInput('rust-version');
2019-08-15 20:54:23 +00:00
if(version) {
2019-08-15 18:12:08 +00:00
await rustup.install(version);
}
2019-08-15 17:16:59 +00:00
} catch (error) {
core.setFailed(error.message);
}
}
run();