Skip to content

Commit

Permalink
Update next.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
O-Isaac authored Nov 19, 2024
1 parent f19e9ac commit b9abb60
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ jobs:
strategy:
matrix:
region:
- jp
- na
version:
- https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder
- https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder.en
game:
- https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.xapk
- https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.en.xapk
- jp,https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder,https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.xapk
- na,https://gplay-ver.atlasacademy.workers.dev/?id=com.aniplex.fategrandorder.en,https://fgo.bigcereal.com/apk/com.aniplex.fategrandorder.en.xapk
permissions:
packages: write
contents: write
steps:
- name: Gettings files from Repo
uses: actions/checkout@v2
- name: Getting enviroment-variable-from-matrix
run: |
$matrix_value = "${{ matrix.region }}"
$parts = $matrix_value -split ","
$region = $parts[0]
$game_url = $parts[1]
$game_ver_url = $parts[2]
echo "REGION=$region" >> $env:GITHUB_ENV
echo "GAME_URL=$game_url" >> $env:GITHUB_ENV
echo "GAME_VER_URL=$game_ver_url" >> $env:GITHUB_ENV
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -42,14 +46,14 @@ jobs:
- name: Download Game apk
run: |
mkdir apk
Invoke-WebRequest -Uri "${{ matrix.game }}" -OutFile "apk\fate.xapk"
Invoke-WebRequest -Uri "${{ env.GAME_URL }}" -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 }}"
$version = Invoke-RestMethod -Uri "${{ env.GAME_VER_URL }}"
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
Expand All @@ -61,8 +65,8 @@ jobs:
- name: Get verCode from apk
run: |
java -jar fgo-vce.jar -s decrypt/stringliteral.json -av ${{ env.VERSION }}
Rename-Item -Path "app.json" -NewName "${{ matrix.region }}json"
Rename-Item -Path "app.json" -NewName "${{ env.REGION }}.json"
- name: Upload app.json
uses: EndBug/add-and-commit@v9
with:
add: '${{ matrix.region }}.json'
add: '${{ env.REGION }}.json'

0 comments on commit b9abb60

Please sign in to comment.