Add installer (#1)

* Add installer

* Add tests

* install-dotnet script should be in externals

* merge

* Fix tests

* Fix naming

* Clean up

* Feedback
This commit is contained in:
Danny McCormick
2019-06-21 08:21:08 -04:00
committed by GitHub
parent 9629dab57e
commit 187843cd79
9 changed files with 2698 additions and 2 deletions

23
src/setup-dotnet.ts Normal file
View File

@ -0,0 +1,23 @@
import * as core from '@actions/core';
import * as installer from './installer';
async function run() {
try {
//
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
const version = core.getInput('version');
if (version) {
const dotnetInstaller = new installer.DotnetCoreInstaller(version);
await dotnetInstaller.installDotnet();
}
// TODO: setup proxy from runner proxy config
// TODO: problem matchers registered
} catch (error) {
core.setFailed(error.message);
}
}
run();