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