Split from T196602: Streamline MW security release process.
We want to move to a git archive like solution for tarball creation because it gets rid of a ton of complexity with branches, patches, and so on. Everything needed to create the tarball is in the git repository itself, which should make them more deterministic and easier to recreate. Bundled stuff is in submodules, and exclusions are in .gitattributes.
It doesn't look like native git archive will meet our needs though because it doesn't include submodules. https://github.com/Kentzo/git-archive-all is a prospective candidate.
We would still want to keep a wrapper around git archive that does some sanity checks like $wgVersion, creates the patch files, etc.