File tree Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1
- name : ' Sync Sponsors and Contributors Data'
1
+ name : ' Sync Sponsors Data'
2
2
3
3
on :
4
4
schedule :
7
7
workflow_dispatch :
8
8
9
9
jobs :
10
- fetch -sponsors-data :
11
- name : Sync Sponsors and Contributors Data
10
+ sync -sponsors-data :
11
+ name : Sync Sponsors Data
12
12
runs-on : ubuntu-latest
13
- permissions :
14
- contents : write
15
13
16
14
steps :
17
15
- name : Checkout repository
26
24
27
25
- run : pnpm i
28
26
29
- - name : fetch -sponsors
30
- run : pnpm --filter fetch- sponsors run build
27
+ - name : sync -sponsors
28
+ run : pnpm sync: sponsors
31
29
env :
32
30
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
31
43
41
if : github.event_name != 'pull_request' && github.event_name != 'push'
44
42
with :
45
43
token : ${{ secrets.ORG_TAURI_BOT_PAT }}
46
- commit-message : ' chore(docs): Update Sponsors & Contributors Data'
47
- branch : ci/v2/update-data-docs
48
- path : tauri-docs
49
- title : Update Sponsors & Contributors Data
44
+ commit-message : ' chore(docs): Update Sponsors Data'
45
+ branch : ci/v2/update-sponsors
46
+ title : Update Sponsors Data
50
47
labels : ' bot'
51
-
Original file line number Diff line number Diff line change 9
9
"dev:setup:tauri" : " pnpm install -C packages/tauri/packages/api --ignore-workspace --no-frozen-lockfile" ,
10
10
"dev:setup:plugins-workspace" : " pnpm -C packages/plugins-workspace install" ,
11
11
"dev:setup" : " pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace && pnpm build:compatibility-table" ,
12
+ "sync:sponsors" : " pnpm --filter fetch-sponsors run build -- sponsors" ,
13
+ "sync:contributors" : " pnpm --filter fetch-sponsors run build -- contributors" ,
12
14
"dev" : " astro dev" ,
13
15
"format" : " prettier -w --cache --plugin prettier-plugin-astro ." ,
14
16
"format:check" : " prettier -c --cache --plugin prettier-plugin-astro ." ,
Original file line number Diff line number Diff line change @@ -2,10 +2,21 @@ import { fetchGitHubContributorsData } from './githubContributors.ts';
2
2
import { fetchGitHubSponsors } from './githubSponsors.ts' ;
3
3
import { fetchOpenCollectiveData } from './openCollective.ts' ;
4
4
5
- async function main ( ) {
5
+ export async function fetchContributors ( ) {
6
+ await fetchGitHubContributorsData ( ) ;
7
+ }
8
+
9
+ export async function fetchSponsors ( ) {
6
10
await fetchOpenCollectiveData ( ) ;
7
11
await fetchGitHubSponsors ( ) ;
8
- await fetchGitHubContributorsData ( ) ;
9
12
}
10
13
11
- main ( ) ;
14
+ const target = process . argv [ 2 ] ;
15
+
16
+ if ( target === 'contributors' ) {
17
+ await fetchContributors ( ) ;
18
+ } else if ( target === 'sponsors' ) {
19
+ await fetchSponsors ( ) ;
20
+ } else {
21
+ process . exit ( 1 ) ;
22
+ }
You can’t perform that action at this time.
0 commit comments