For over the last >1 year, Google has been dismissing people without warning or cause. The days where it was nearly impossible to be fired are over; now you might be severed by surprise for no given reason at all.
(edit: not saying that was the case here, working on devrel usually makes it part of your job to publish code)
I would never fire an employee unilaterally, especially over something like this, when there's valuable IP at stake and you can just talk the person into agreeing to sign over whatever it is you need.