I don’t get it, why not just include a link to github in your pdf?
Links to external sites have a tendency to rot.
I've stumbled upon a number of scientific papers from 2000s that include links to sourceforge for code listings. Most of those are dead now.
Github will not be there for ever.
Arxiv.org won't accept a pdf with attachments though, so only a stripped-down version will come there (once/if I get an endorsement, fingers crossed).
I copied this concept from Joe Armstrong, where he suggested to distribute Erlang modules as PDFs with code files (*.erl) as attachments. "Documentation comes first, and the distribution should prioritize humans".
[1]: See Section A.1 of https://github.com/motiejus/wm/blob/main/mj-msc-full.pdf