Skip to content

Commit

Permalink
chore: add sponsorkit (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
shufo authored Jun 19, 2023
1 parent 003e7a2 commit 3b2a38f
Show file tree
Hide file tree
Showing 6 changed files with 1,973 additions and 1,109 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Scheduler

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches: [main]

jobs:
update-sponsors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*

- run: npm install

- name: Update sponsors
run: npm run build
env:
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORKIT_GITHUB_TOKEN }}
SPONSORKIT_GITHUB_LOGIN: ${{ secrets.SPONSORKIT_GITHUB_LOGIN }}

- name: Commit
uses: EndBug/add-and-commit@v4
with:
message: "chore: update sponsors.svg"
add: "sponsors.*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ $ yarn run compile
$ yarn run test
```

## Sponsors

![](./sponsorkit/sponsors.png)

## Contributors

<!-- readme: collaborators,contributors -start -->
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"eslint": "8.42.0",
"glob": "8.1.0",
"mocha": "^10.0.0",
"sponsorkit": "^0.8.5",
"ts-jest": "29.1.0",
"ts-loader": "9.4.3",
"ts-migrate": "0.1.35",
Expand Down
21 changes: 21 additions & 0 deletions sponsor.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineConfig, presets } from "sponsorkit";

export default defineConfig({
// includePrivate: true,
formats: ["png"],
tiers: [
{
title: "Sponsors",
preset: presets.xl,
// to insert custom elements after the tier block
composeAfter: (composer, _tierSponsors, _config) => {
composer.addSpan(10);
},
},
{
title: "Past Sponsors",
monthlyDollars: -1,
preset: presets.large,
},
],
});
Binary file added sponsorkit/sponsors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3b2a38f

Please sign in to comment.