mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-11 02:44:20 +00:00
authorize upload
This commit is contained in:
parent
935aebbf1d
commit
085ff2701b
2 changed files with 8 additions and 4 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -2507,12 +2507,14 @@ exports.upload = (gh, url, path) => __awaiter(void 0, void 0, void 0, function*
|
|||
const resp = yield node_fetch_1.default(endpoint, {
|
||||
headers: {
|
||||
"content-length": `${size}`,
|
||||
"content-type": mime
|
||||
"content-type": mime,
|
||||
authorization: `${gh.auth}`
|
||||
},
|
||||
method: "POST",
|
||||
body
|
||||
});
|
||||
console.log(`resp`, resp);
|
||||
console.log(`resp headers`, resp.headers);
|
||||
console.log(resp.status);
|
||||
const json = yield resp.json();
|
||||
console.log(`body`, json);
|
||||
return json;
|
||||
|
|
|
@ -140,12 +140,14 @@ export const upload = async (
|
|||
const resp = await fetch(endpoint, {
|
||||
headers: {
|
||||
"content-length": `${size}`,
|
||||
"content-type": mime
|
||||
"content-type": mime,
|
||||
authorization: `${gh.auth}`
|
||||
},
|
||||
method: "POST",
|
||||
body
|
||||
});
|
||||
console.log(`resp`, resp);
|
||||
console.log(`resp headers`, resp.headers);
|
||||
console.log(resp.status);
|
||||
const json = await resp.json();
|
||||
console.log(`body`, json);
|
||||
return json;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue