From 4fd3886827dbedac0eb90c8c0abb346d5d2be480 Mon Sep 17 00:00:00 2001 From: Tom Doughty Date: Thu, 21 Nov 2019 13:58:40 +0000 Subject: [PATCH] Use node file system --- .github/actions/upload_release_artifact/upload-artifact.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/upload_release_artifact/upload-artifact.js b/.github/actions/upload_release_artifact/upload-artifact.js index 7adde29..b7532c2 100644 --- a/.github/actions/upload_release_artifact/upload-artifact.js +++ b/.github/actions/upload_release_artifact/upload-artifact.js @@ -4,8 +4,10 @@ const fs = require('fs'); module.exports = async () => { try { - const event = fs.readFile(process.env.GITHUB_EVENT_PATH) - console.log(event); + const event = fs.readFile(process.env.GITHUB_EVENT_PATH, (err, res) => { + if (err) throw err; + return res; + }); // Get authenticated GitHub client (Ocktokit): https://github.com/actions/toolkit/tree/master/packages/github#usage const github = new GitHub(process.env.GITHUB_TOKEN);