You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-09-03 03:14:05 +07:00
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:
23
src/setup-dotnet.ts
Normal file
23
src/setup-dotnet.ts
Normal 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();
|
Reference in New Issue
Block a user