Skip to content
Permalink
Browse files

chore(generic): upgrade github to v13

releases uploadAsset API was changed
  • Loading branch information
malept committed Jan 10, 2018
1 parent 0ecc57d commit a80ff504e1669ae41d4a3e687cb25c0c0c34812b
Showing with 8 additions and 5 deletions.
  1. +2 −1 package.json
  2. +6 −4 src/publishers/github.js
@@ -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();

0 comments on commit a80ff50

Please sign in to comment.
You can’t perform that action at this time.