ci: properly extract name from minified docs files

This commit is contained in:
Noel
2023-11-17 23:37:14 +01:00
committed by GitHub
parent 492f86af39
commit 55be1c901a

View File

@@ -21,7 +21,8 @@ for await (const file of globber.globGenerator()) {
const data = await readFile(file, 'utf8');
try {
console.log(`Uploading ${file} with ${version}...`);
const { name } = JSON.parse(data);
const json = JSON.parse(data);
const name = json.name ?? json.n;
const { url } = await put(`${name.replace('@discordjs/', '')}/${version}.json`, data, {
access: 'public',
addRandomSuffix: false,