@@ -6,8 +6,8 @@ const version = readFileSync("version", { encoding: "utf8" });
|
|||||||
const repoBaseUrl = `${process.env.INPUT_REPO_URL}/${libName}/${version}`;
|
const repoBaseUrl = `${process.env.INPUT_REPO_URL}/${libName}/${version}`;
|
||||||
const packageJsonUrls = [];
|
const packageJsonUrls = [];
|
||||||
|
|
||||||
const sendFile = async (path, data) => {
|
const sendFile = async (urlPath, data) => {
|
||||||
let r = await fetch(`${repoBaseUrl}/${path}`, {
|
let r = await fetch(`${repoBaseUrl}/${urlPath}`, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Basic ${process.env.INPUT_REPO_USER}:${process.env.INPUT_REPO_PASS}`,
|
Authorization: `Basic ${process.env.INPUT_REPO_USER}:${process.env.INPUT_REPO_PASS}`,
|
||||||
@@ -16,7 +16,7 @@ const sendFile = async (path, data) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (r.status != 200) {
|
if (r.status != 200) {
|
||||||
throw `FAILED TO UPLOAD TO ${repoBaseUrl}/${path}`;
|
throw `FAILED TO UPLOAD TO ${repoBaseUrl}/${urlPath}`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user