-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (62 loc) · 1.93 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Update
on:
workflow_dispatch:
repository_dispatch:
types:
- update_event
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set vars
id: var
run: |
packageId="com.kiloo.subwaysurf" >> $GITHUB_OUTPUT
echo version=$(curl -s "https://gplayapi.cashlessconsumer.in/api/apps/$packageId" | jq -r '.version' | tr '.' '-') >> $GITHUB_OUTPUT
- name: Create Folder
run: |
mkdir temp/upload
mkdir temp/output
- name: Cache dependencies
uses: actions/[email protected]
with:
python-version: '3.x'
cache: 'pip'
- name: Install
run: pip install -r requirements.txt
- name: Scrape Wiki Data
run: |
python script/fetch_links.py
python script/fetch_profile.py
python script/fetch_outfits.py
- name: Get latest Gamefile
run: python script/down-ipa.py ${{steps.var.outputs.version}} ${{ secrets.SESSION }}
- name: Unpack apk
run: python misc/unpack-ipa.py ${{steps.var.outputs.version}}
- name: Extract Game Data
run: |
python script/fetch_characters.py
python script/fetch_boards.py
python script/playerprofile.py
python script/userstats.py
python script/collection.py
python script/calender.py
python script/mailbox.py
- name: Update Game Data
run: |
python misc/sort_characters.py
python misc/sort_boards.py
- name: Check changes
id: update
run: python misc/check.py
- name: Upload Data
uses: softprops/action-gh-release@v2
with:
body_path: 'temp/update.txt'
tag_name: ${{steps.var.outputs.version}}
files: temp/upload/*
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}