Update next.yml #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Extracting VerCode - Next | |
on: | |
schedule: | |
- cron: '0 8 * * *' | |
- cron: '19 15 * * *' | |
push: | |
branches: [next] | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
region: | |
- jp | |
- na | |
include: | |
- region: na | |
game: https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.en.xapk | |
version: https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder.en | |
- region: jp | |
game: https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.xapk | |
version: https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder | |
permissions: | |
packages: write | |
contents: write | |
steps: | |
- name: Gettings files from Repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Download Edit Tools | |
run: | | |
Invoke-WebRequest -Uri "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.10.0.jar" -OutFile "apktool.jar" | |
Invoke-WebRequest -Uri "https://github.com/REAndroid/APKEditor/releases/download/V1.4.1/APKEditor-1.4.1.jar" -OutFile "apkeditor.jar" | |
Invoke-WebRequest -Uri "https://github.com/O-Isaac/FGO-VCE/releases/latest/download/FGO-VCE-1.0-SNAPSHOT-jar-with-dependencies.jar" -OutFile "fgo-vce.jar" | |
- name: Download Dump Tools | |
run: | | |
Invoke-WebRequest -Uri "https://github.com/Perfare/Il2CppDumper/releases/download/v6.7.40/Il2CppDumper-win-v6.7.40.zip" -OutFile "dumper.zip" | |
Expand-Archive -Path "dumper.zip" -DestinationPath "il2cppdumper" | |
- name: Download Game apk | |
run: | | |
mkdir apk | |
Invoke-WebRequest -Uri "${{ matrix.game }}" -OutFile "apk\fate.xapk" | |
- name: Merge XAPK into apk | |
run: | | |
java -jar apkeditor.jar m -i apk/fate.xapk -o apk/fate.apk | |
rm apk/fate.xapk | |
- name: Set Game Version | |
run: | | |
$version = Invoke-RestMethod -Uri "${{ matrix.version }}" | |
echo "VERSION=$version" | Out-File -Append -FilePath $env:GITHUB_ENV | |
- name: Decompiling apk | |
run: java -jar apktool.jar d apk/fate.apk --output files -f | |
- name: Dumping libil2cpp.so from apk | |
run: | | |
mkdir decrypt | |
Invoke-WebRequest -Uri "https://gist.githubusercontent.com/O-Isaac/feef23001b533bca635d5ba26b2b93c6/raw/config.json" -OutFile "il2cppdumper\config.json" | |
il2cppdumper/Il2CppDumper.exe files/lib/arm64-v8a/libil2cpp.so files/assets/bin/Data/Managed/Metadata/global-metadata.dat decrypt | |
- name: Get verCode from apk | |
run: | | |
java -jar fgo-vce.jar -s decrypt/stringliteral.json -av ${{ env.VERSION }} -o ${{ matrix.region }}.json | |
- name: Upload app.json | |
uses: EndBug/add-and-commit@v9 | |
with: | |
pull: '--rebase --autostash' | |
add: '${{ matrix.region }}.json' | |
default_author: github_actions | |
message: | | |
'✨ Update for ${{ matrix.region }} - Commit on $(Get-Date -Format "yyyy-MM-dd") 🚀' | |