sponsorkit-starter is a GitHub template repository for SponsorKit toolkit for automatically generating sponsors images from GitHub Sponsors.
It is heavily inspired by antfu/static.
Setup as a starter template, you can easily generate a new GitHub repository. From the repository homepage, click the "Use this template" button.
.github/workflows/scheduler.ymlthat runs the SponsorKit action on a schedule every day, for each merge on the main branch, or manually..env.exampleas described in SponsorKit usage.build.shscript to generate the sponsors images.package.jsonrelying on the latest version of SponsorKit and containing thebuildscript.sponsor.config.tsthat contains the configuration for the generation of the sponsors images.
- Create a new repository from this template.
- Change its default settings to have “Read an write permissions” for the “Workflow permissions” option in "Actions" section.
- Modify
.github/workflows/scheduler.ymlto set your GitHub username for theSPONSORKIT_GITHUB_LOGINenvironment variable. - Create a
SPONSORS_TOKENsecret in your repository settings with a GitHub personal access token (classic) with theread:organdread:userscopes. - (Optional) Modify the
sponsor.config.tsfile to match your needs. - Commit and push your changes to the main branch. It will trigger the workflow, generate and commit the sponsors images at the root level of your repository.
You can also generate the sponsors images locally by running the build.sh script.
For that, you need to copy .env.example to .env and set the SPONSORKIT_GITHUB_TOKEN and SPONSORKIT_GITHUB_LOGIN variables.
And then simply run npm run build.