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

@@ -20,6 +20,8 @@ const core = __importStar(require("@actions/core"));
const Inputs_1 = require("./Inputs");
const Releases_1 = require("./Releases");
const Action_1 = require("./Action");
const ArtifactUploader_1 = require("./ArtifactUploader");
const ArtifactGlobber_1 = require("./ArtifactGlobber");
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@@ -35,8 +37,10 @@ function createAction() {
const token = core.getInput('token');
const context = github.context;
const git = new github.GitHub(token);
const globber = new ArtifactGlobber_1.FileArtifactGlobber();
const inputs = new Inputs_1.CoreInputs(globber, context);
const releases = new Releases_1.GithubReleases(context, git);
const inputs = new Inputs_1.CoreInputs(context);
return new Action_1.Action(inputs, releases);
const uploader = new ArtifactUploader_1.GithubArtifactUploader(releases);
return new Action_1.Action(inputs, releases, uploader);
}
run();