Such action is haram, and the person who do so should be punished, and eating that goat becomes haram.
However the punishment is not execution, and it is not carried out by normal people. It should be applied by the judge.
Any how, if the person practiced this guilt truly repented, Alla swt accepts his repentance.
With regard to considering him apostate, the answer is no.
Such jokes are haram