Skip to content

L'Antre de la Légende #161

L'Antre de la Légende

L'Antre de la Légende #161

Workflow file for this run

name: Workflow
on:
workflow_dispatch:
repository_dispatch:
jobs:
Job_U:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: |
npm install -g cytrus-v6
- name: U1 - Update Dofus Client
run: |
cytrus-v6 download --game dofus --select "DofusInvoker.swf,**/*.d2i,**/*.d2o,VERSION" --output data/U/
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: Job_U
path: |
data/U/
Job_A:
runs-on: ubuntu-latest
needs: [Job_U]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Job_U
path: data/U/
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: A1 - Extract DofusInvoker.swf
run: |
chmod +x src/A1.sh
src/A1.sh data/U/DofusInvoker.swf data/A/DofusInvoker/
- name: A2 - Build .json
run: |
python src/A2.py data/A/DofusInvoker/scripts/com/ data/A/events.json
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: Job_A
path: |
data/A/
Job_B:
runs-on: ubuntu-latest
needs: [Job_U]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Job_U
path: data/U/
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: B1 - Build .json
run: |
rm data/B/entities_json/*
python src/B1.py data/U/data/common/ data/B/entities_json/
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: Job_B
path: |
data/B/
Job_C:
runs-on: ubuntu-latest
needs: [Job_U]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Job_U
path: data/U/
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: C1 - Build .json
run: |
python src/C1.py data/U/data/i18n/ data/C/translations_json/
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: Job_C
path: |
data/C/
Job_P:
runs-on: ubuntu-latest
needs: [Job_A, Job_B, Job_C]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Remove data folder
run: |
rm -r data/
- name: Download files Job U
uses: actions/download-artifact@v3
with:
name: Job_U
path: data/U/
- name: Download files Job A
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: Job_A
path: data/A/
- name: Download files Job B
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: Job_B
path: data/B/
- name: Download files Job C
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: Job_C
path: data/C/
- name: Get latest Dofus version
run: |
export DOFUS_VERSION=$(cat data/U/VERSION)
echo The current Dofus version is $DOFUS_VERSION
echo "::set-env name=VERSION::$DOFUS_VERSION"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Create zip file
run: |
zip -r data.zip data/A/ data/B/ data/C/
- name: Split entities json
run: |
chmod +x devscript/split.sh
./devscript/split.sh data/B/entities_json/
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
add: '["data/A/", "data/B/", "data/C/"]'
message: 'Update ${{ env.VERSION }}'
push: true
- name: Publish release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.VERSION }}
prerelease: false
title: ${{ env.VERSION }}
files: |
./data.zip