Fixes #1 Allow for multiple artifacts

This commit is contained in:
Nick Cipollo
2019-09-02 17:20:04 -04:00
parent 261c1fc08b
commit a698287254
24 changed files with 462 additions and 167 deletions

View File

@@ -3,6 +3,8 @@ import * as core from '@actions/core';
import { CoreInputs } from './Inputs';
import { GithubReleases } from './Releases';
import { Action } from './Action';
import { GithubArtifactUploader } from './ArtifactUploader';
import { FileArtifactGlobber } from './ArtifactGlobber';
async function run() {
try {
@@ -17,9 +19,12 @@ function createAction(): Action {
const token = core.getInput('token')
const context = github.context
const git = new github.GitHub(token)
const globber = new FileArtifactGlobber()
const inputs = new CoreInputs(globber, context)
const releases = new GithubReleases(context, git)
const inputs = new CoreInputs(context)
return new Action(inputs, releases)
const uploader = new GithubArtifactUploader(releases)
return new Action(inputs, releases, uploader)
}
run();