chore(generic): upgrade github to v13

releases uploadAsset API was changed
This commit is contained in:
Mark Lee 2018-01-09 17:07:42 -08:00 коммит произвёл Mark Lee
Родитель 0ecc57dd8d
Коммит a80ff504e1
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -121,12 +121,13 @@
"electron-rebuild": "^1.6.0",
"form-data": "^2.1.4",
"fs-extra": "^5.0.0",
"github": "^12.0.3",
"github": "^13.1.0",
"glob": "^7.1.1",
"inquirer": "^5.0.0",
"lodash.merge": "^4.6.0",
"lodash.template": "^4.4.0",
"log-symbols": "^2.0.0",
"mime-types": "^2.1.17",
"node-fetch": "^1.6.3",
"node-gyp": "^3.4.0",
"nugget": "^2.0.1",

Просмотреть файл

@ -1,3 +1,5 @@
import fs from 'fs-extra';
import mime from 'mime-types';
import path from 'path';
import asyncOra from '../util/ora-handler';
@ -57,10 +59,10 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag) => {
return done();
}
await github.getGitHub().repos.uploadAsset({
owner: forgeConfig.github_repository.owner,
repo: forgeConfig.github_repository.name,
id: release.id,
filePath: artifactPath,
url: release.upload_url,
file: fs.createReadStream(artifactPath),
contentType: mime.lookup(artifactPath) || 'application/octet-stream',
contentLength: (await fs.stat(artifactPath)).size,
name: path.basename(artifactPath),
});
return done();