Add a "Sponsor" button at the top of your GitHub repository that links to Patreon

GitHub recently announced their “GitHub Sponsors” program as a way for users to sponsor open source contributors:

They make it easy for developers to attract sponsors by adding a “Sponsor” button at the top of a repository. Their main intent is for this to be used by developers who apply to GitHub’s sponsorship program. But I also noticed that this new button allows Patreon links!

If you have repositories on GitHub, it’s actually super easy to add this button:

  1. Check a checkbox in repository settings to enable sponsorships.
  2. Add a FUNDING.yml file to a .github folder, with a single line of text specifying your Patreon username (example).

Full instructions here:

Here’s my repository, showing the button at the top: