Update main

This commit is contained in:
Nick Cipollo
2019-08-27 09:40:03 -04:00
parent ef24c2a7b5
commit 0280874154

View File

@@ -1,25 +1,25 @@
import * as github from '@actions/github';
import * as core from '@actions/core';
import { Inputs, CoreInputs } from './Inputs';
import { Releases, GithubReleases } from './Releases';
import { CoreInputs } from './Inputs';
import { GithubReleases } from './Releases';
import { Action } from './Action';
async function run() {
try {
const token = core.getInput('token');
const context = github.context
const git = new github.GitHub(token);
const releases = new GithubReleases(context, git)
const inputs = new CoreInputs(context)
await releases.create(inputs.tag)
.catch(error => {
core.warning(error)
})
.then(response => {
core.warning(`response: ${response}`)
})
const action = createAction()
await action.perform()
} catch (error) {
core.setFailed(error.message);
}
}
function createAction(): Action {
const token = core.getInput('token')
const context = github.context
const git = new github.GitHub(token)
const releases = new GithubReleases(context, git)
const inputs = new CoreInputs(context)
return new Action(inputs, releases)
}
run();