Combat Mecha Xabungle is an anime series from the 1980’s. It was directed by Yoshiyuki Tomino, most famous for Mobile Suit Gundam, and to a lesser extent Brave Raideen and Space Runaway Ideon, but Xabungle is a lot lighter and more comedic than those, or most of Tomino’s other work.
Fun fact; I think it was during Gundam’s original run when a fan asked Tomino this question; White Base (the ship from Gundam) kind of looks like it could transform, so is it really a robot? Obviously the answer was no, but Tomino’s infamous answer was “You watch too much anime. Watch more Gundam.” (This may or may not be a factor in why Gundam ZZ had an opening song called “It’s Not Anime.”)
But in Xabungle, one of the next series Tomino worked on, the carrier landship Iron Gear does transform into a giant robot. (Of course, in between those two series, Macross had premiered, with an even bigger transforming spaceship.)
Xabungle was also the first mecha anime where the main character got a totally new mecha halfway through, something that would become pretty common in the real robot genre afterwards.
And Jiron’s head is shaped like a melon.
(That screenshot is from Super Robot Wars Alpha Gaiden, and is not altered.)