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.yml
that runs the SponsorKit action on a schedule every day, for each merge on the main branch, or manually..env.example
as described in SponsorKit usage.build.sh
script to generate the sponsors images.package.json
relying on the latest version of SponsorKit and containing thebuild
script.sponsor.config.ts
that 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.yml
to set your GitHub username for theSPONSORKIT_GITHUB_LOGIN
environment variable. - Create a
SPONSORS_TOKEN
secret in your repository settings with a GitHub personal access token (classic) with theread:org
andread:user
scopes. - (Optional) Modify the
sponsor.config.ts
file 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
.