Skip to content

update_event

update_event #33

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/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 }}