diff --git a/action.js b/action.js index 501df65..1cd34aa 100644 --- a/action.js +++ b/action.js @@ -38,7 +38,7 @@ readdirSync(".") .forEach(async (moduleFile) => { const modName = moduleFile.slice(0, -3); const modInitPath = `${modName}/__init__.mpy`; - const modPyPath = `${modName}/${modName}.mpy`; + const modPyPath = `${modName}.mpy`; // compile mpy file execSync(`pipx run mpy-cross ${moduleFile}`, { @@ -46,12 +46,11 @@ readdirSync(".") }); // Add module files to repo - await sendFile(modInitPath, new ArrayBuffer(0)); await sendFile(modPyPath, readFileSync(`${modName}.mpy`).buffer); // Update urls packageJsonUrls.push([`${libName}/${modInitPath}`, "__init__.mpy"]); - packageJsonUrls.push([`${libName}/${modPyPath}`, `${modName}.mpy`]); + packageJsonUrls.push([`${libName}/${modPyPath}`, modPyPath]); }); // Add package.json to repo