In the Christmas spirit, Trump tweeted the name of the presumed whistle-blower in the Ukraine scandal, which is a federal offense.
Probably not. There is a statute that makes it a crime for government officials or other individuals with access to national secrets ("classified information") to reveal the identity of a
covert intelligence officer or operator. However, the whistleblower reportedly is an intelligence
analyst, and while there is a convention within the government that the names of intelligence analysts should not gratuitously be made public, they are not considered to be operating under cover and I'm not aware of any law or regulation that attempts to restrict the publication of their names.
The statutory
Intelligence Community Whistleblower Protections and an associated presidential directive prohibit
retaliation against intelligence agency employees who use specified procedures to report violations of law or regulations, mismanagement, waste of funds, abuse of authority, or dangers to public health or safety. However, they define retaliation in terms of prohibited adverse personnel actions, and do not include a general restriction on revealing a whistleblower's identity.
Congress could consider revealing the identity of an employee of an intelligence agency with a retaliatory intent or to induce others to harm that employee as grounds for an article of impeachment, but I think it is a stretch to argue that Trump's tweet constitutes a statutory or regulatory violation.