Skip to content

Commit 6f84893

Browse files
authored
Set up sponsorkit for sponsors image generation (#5)
* Add new files to .gitignore * Set up sponsorkit with scheduled rebuilds * Add first generated sponsors image * remove corepack enable
1 parent 9dd3cfd commit 6f84893

6 files changed

Lines changed: 557 additions & 0 deletions

File tree

.github/workflows/scheduler.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Scheduler
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
update-sponsors:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Setup PNPM
17+
uses: pnpm/action-setup@v6
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: lts/*
23+
24+
- run: pnpm i
25+
26+
- name: Update sponsors
27+
run: pnpm run build
28+
env:
29+
# Requires no scopes or 2FA actions enabled.
30+
SPONSORKIT_OPENCOLLECTIVE_KEY: ${{ secrets.SPONSORKIT_OPENCOLLECTIVE_KEY }}
31+
# Requires the `read:user` and `read:org` scopes.
32+
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Commit
35+
uses: EndBug/add-and-commit@v10
36+
with:
37+
default_author: github_actions
38+
message: "chore: update sponsors.svg"
39+
add: "sponsors/sponsors.*"
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.DS_Store
2+
.cache.json
3+
node_modules

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"type": "module",
3+
"packageManager": "pnpm@10.33.2",
4+
"scripts": {
5+
"build": "sponsorkit"
6+
},
7+
"dependencies": {
8+
"sponsorkit": "^17.1.0"
9+
}
10+
}

0 commit comments

Comments
 (0)