octokat.js
octokat.js copied to clipboard
Release Asset upload not working
I've tried multiple combinations based on the docs and error messages.
repo
.releases
.create({
tag_name: version,
target_commitish: 'master',
name: version
})
.then(release => {
release.upload({ name: 'chrome.zip', label: 'Chrome Extension' }, 'application/zip', fs.readFileSync('./build/chrome/chrome.zip')));
release.upload({ name: 'chrome.zip', label: 'Chrome Extension' }).create('application/zip', fs.readFileSync('./build/chrome/chrome.zip')));
repo.releases(id).assets.create() //Both as an obj for first param and str
})
The docs claim there are 3 args and the deprecation message claims it is an object with create. The latter doesn't work because there is no create off of upload. The doc method does not work at all as it complains about Invalid name for request. If I try it as the the first listed way in the sample I get Invalid Content-Type.
As of April 2017, I am also having this exact same issue. I ended up using https://www.npmjs.com/package/ghreleases instead which works just fine.
Same here.
👍