I was wondering if it's permissible to lie or swear upon Allah and lie, to hide your sins, I have heard that it is haram to disclose of your private sins in public.

Yes, disclosing your private sins is Haram because it could normalize the sin in society. So if you are asked, don’t lie, but do what is called Tawiryah. Give an indirect answer. Or keep a different intention in your mind. For example, if someone asks you, “Did you commit X sin yesterday?” Reply by saying, “No, I did not commit X sin” (then in your mind say ‘a week ago.) That way you avoid lying.