Probably.
But the rules, regulations, licensing and approvals you need to follow depend on where you are in the World.
And it could be a requirement of the software libraries you are using that you publich the source code into the public domain.
And dont forget to insure against your products causing harm.