-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (66 loc) · 1.96 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
77
78
79
80
81
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 upload
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/
key: ${{ runner.os }}-pip
restore-keys: |
${{ runner.os }}-pip
- name: Install
run: |
pip install -r requirements.txt
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/
key: ${{ runner.os }}-pip
restore-keys: |
${{ runner.os }}-pip
- name: Scrape Wiki Data
run: |
python script/fetch_links.py
python script/fetch_outfits.py
- name: Get latest Apk
run: python script/down-apk.py ${{steps.var.outputs.version}}
- name: Unpack apk
run: python misc/unpack.py ${{steps.var.outputs.version}}
- name: Extract Game Data
run: |
python script/fetch_characters.py
python script/fetch_boards.py
python script/collection.py
python script/calender.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@v1
with:
body_path: 'update.txt'
tag_name: ${{steps.var.outputs.version}}
files: upload/*
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}