A linter can catch some obvious errors: https://github.com/rhysd/actionlint. But yes, I agree, it's not a fun debugging experience.
Unfortunately, it can't lint actions themselves, only workflows that call actions[1]. This is a substantial deficiency, especially for users (like me) who write and maintain a decent number of actions.