build: upload the file stream not a JSON blob for the read stream (#24889)
This commit is contained in:
parent
cbdfeb1979
commit
854b74809a
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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.`);
|
||||
|
|
Loading…
Add table
Reference in a new issue