How do you compile playdate games?

So, I've just made a huge screw-up and posted VERY IMPORTANT Playdate games but I realized that the games weren't compiled? set up? managed? I don't know but every time someone tries to sideload it, it comes up with the error Could not find a top-level .pdx file.Could someone tell me how to compile my playdate game?

Not sure if you're using Lua or C but running pdc <source code directory> in the parent directory should compile it to a .pdx. If you're using C the instructions are here.

sorry, I'm using Lua as the tags say but how to I run a piece of code?

If the game is zipped make sure it's not within a folder in the zip.