Skip to content

update_event

update_event #39

Workflow file for this run

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/setup-python@v5.1.0
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 Apk
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: 'update.txt'
tag_name: ${{steps.var.outputs.version}}
files: upload/*
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}