Making latex sourcefiles publicly available by default
If you upload your papers to arXiv, then your Latex source is already publicly available there (click "other formats" and then "download source").  So the only difference is that the source would also be available on Github.

There is no legal issue with this unless you sign an agreement that forbids it.  In that case, the publisher could ask you to remove the manuscript from Github.