Try providing the serialization as an attachment name
This commit is contained in:
parent
5e0028cdd6
commit
41d3541c4b
1 changed files with 5 additions and 1 deletions
|
|
@ -13,7 +13,9 @@ async function uploadFile(releaseID, localPath, remoteName = undefined) {
|
||||||
const stream = createReadStream(localPath);
|
const stream = createReadStream(localPath);
|
||||||
return axios.post(
|
return axios.post(
|
||||||
`${API}/repos/${REPO}/releases/${releaseID}/assets`,
|
`${API}/repos/${REPO}/releases/${releaseID}/assets`,
|
||||||
stream,
|
{
|
||||||
|
attachment: stream,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `token ${TOKEN}`,
|
Authorization: `token ${TOKEN}`,
|
||||||
|
|
@ -57,6 +59,8 @@ async function main() {
|
||||||
} catch {
|
} catch {
|
||||||
console.error(`Failed to delete draft release`);
|
console.error(`Failed to delete draft release`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
process.exit(1);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue