First: you ought to disclose that information when commenting on a topic that relates in some way to your financial incentives.
Second: when I worked at Google under Chrome it was very common for individuals and teams to publish projects to open source repositories under Google-managed Github orgs. In fact, for most of my tenure ('15-'21) my team had license to publish to Github unilaterally (no approval from the open source office required). Great power comes with great responsibility, but also I would put to you that publishing an open source project like this one is part of Google's culture.
Firing seems an extreme consequence for the perceived damage of a long-tenured employee's behavior in this case.