build: upload the file stream not a JSON blob for the read stream (#24889)

This commit is contained in:
Samuel Attard 2020-08-07 12:00:12 -07:00 committed by GitHub
parent cbdfeb1979
commit 854b74809a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ async function uploadShasumFile (filePath, fileName, releaseId) {
'content-type': 'text/plain',
'content-length': fs.statSync(filePath).size
},
file: fs.createReadStream(filePath),
data: fs.createReadStream(filePath),
name: fileName
}).catch(err => {
console.log(`${fail} Error uploading ${filePath} to GitHub:`, err);

View file

@ -41,7 +41,7 @@ function uploadToGitHub () {
octokit.repos.uploadReleaseAsset({
url: uploadUrl,
headers: getHeaders(filePath, fileName),
file: fs.createReadStream(filePath),
data: fs.createReadStream(filePath),
name: fileName
}).then(() => {
console.log(`Successfully uploaded ${fileName} to GitHub.`);