From a8d8afcb64e7c29d40bc3827e66ed09079fd72d7 Mon Sep 17 00:00:00 2001 From: Thomas Neil James Shadwell Date: Wed, 4 May 2022 16:12:35 -0700 Subject: [PATCH] yarn fix (#122) --- deploy/artifacts/BUILD | 2 +- deploy/artifacts/release.ts | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/deploy/artifacts/BUILD b/deploy/artifacts/BUILD index 818db07cab..8edfc1cd57 100644 --- a/deploy/artifacts/BUILD +++ b/deploy/artifacts/BUILD @@ -12,9 +12,9 @@ ts_project( name = "release_src", srcs = ["release.ts"], deps = [ - "@npm//mime", "@npm//@actions/github", "@npm//@types/node", + "@npm//mime", ], ) diff --git a/deploy/artifacts/release.ts b/deploy/artifacts/release.ts index 8e7b2a3267..0f9d678a2b 100644 --- a/deploy/artifacts/release.ts +++ b/deploy/artifacts/release.ts @@ -31,15 +31,16 @@ async function main() { const mappings = process.argv.slice(2).map(v => v.split('=')); const ab = await Promise.all( - mappings.map(async ([name, file]) => - await Github.rest.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: (await release).data.id, - name, - // https://github.com/octokit/octokit.js/discussions/2087#discussioncomment-646569 - data: (await fs.readFile(file)) as unknown as string, - }) + mappings.map( + async ([name, file]) => + await Github.rest.repos.uploadReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: (await release).data.id, + name, + // https://github.com/octokit/octokit.js/discussions/2087#discussioncomment-646569 + data: (await fs.readFile(file)) as unknown as string, + }) ) );