Skip to content

Update Sponsors

Update Sponsors #46

name: Update Sponsors
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
push:
branches:
- release
paths:
- '.github/workflows/update-sponsors.yml'
- 'sponsor.config.js'
jobs:
update-sponsors:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Generate Sponsors
run: npx sponsorkit@latest
env:
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
- name: Commit and Push Changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: update sponsors section [skip ci]"
git push
fi