Skip to content

Commit

Permalink
ci: revert "use workflow from shared repo (#22)" (#23)
Browse files Browse the repository at this point in the history
Revert "ci: use workflow from shared repo (#22)"

This reverts commit dc1eea4.
  • Loading branch information
ismailbennani authored Aug 31, 2024
1 parent dc1eea4 commit ae97983
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 912 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/fetch-game-files.job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Fetch game files

on:
workflow_call:
outputs:
bepinex_version:
description: "Version of BepInEx"
value: "6.0.0-be.697+5362580"
game_build_id:
description: "Build ID of the game"
value: ${{ jobs.fetch-game-files.outputs.game_build_id }}
game_version:
description: "Version of the game"
value: ${{ jobs.fetch-game-files.outputs.game_version }}

jobs:
fetch-game-files:
name: Fetch game files
runs-on: windows-latest

permissions:
packages: read

outputs:
game_build_id: ${{ steps.read_dofus_build_id.outputs.dofus_build_id }}
game_version: ${{ steps.read_dofus_version.outputs.dofus_version }}

steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Setup Github NPM registry for @dofus-batteries-included namespace
run: |
echo @dofus-batteries-included:registry=https://npm.pkg.github.com > ~/.npmrc
echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} >> ~/.npmrc
- name: Install Cytrus v6
run: npm i @dofus-batteries-included/cytrus-v6 -g

- name: Read current game version
id: read_dofus_version
run: |
$CytrusGameVersion=$(cytrus-v6 version -g dofus -b)
echo "dofus_version=$($CytrusGameVersion.Split(`"_`")[1])" >> $Env:GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download BepInEx
run: curl https://builds.bepinex.dev/projects/bepinex_be/697/BepInEx-Unity.IL2CPP-win-x64-6.0.0-be.697%2B5362580.zip -o BepInEx.zip

- name: Download latest game files
run: cytrus-v6 download -g dofus -b -s "Dofus.exe,*.dll,Dofus_Data/*,Dofus_Data/il2cpp_data/**/*,Dofus_Data/Plugins/**/*,Dofus_Data/Resources/**/*" -o dofus-beta # Use beta for now

- name: Extract BepInEx
run: 7z x BepInEx.zip -odofus-beta -aoa

- name: Run game once
run: node scripts/bepinex-first-run dofus-beta\Dofus.exe
timeout-minutes: 10

- name: Read game build id
id: read_dofus_build_id
run: echo "dofus_build_id=$(node scripts/read-build-guid.js dofus-beta/Dofus_Data/boot.config)" >> $Env:GITHUB_OUTPUT

- name: Display build information
run: |
echo "Build id: ${{ steps.read_dofus_build_id.outputs.dofus_build_id }}"
echo "Version: ${{ steps.read_dofus_version.outputs.dofus_version }}"
- name: Upload Interop assemblies
uses: actions/upload-artifact@v4
with:
name: interop-assemblies
path: dofus-beta/BepInEx/interop/*
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
fetch-game-files:
uses: Dofus-Batteries-Included/actions/.github/workflows/fetch-last-game-files.job.yml@main
uses: ./.github/workflows/fetch-game-files.job.yml

build-release:
name: Build & Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
fetch-game-files:
uses: Dofus-Batteries-Included/actions/.github/workflows/fetch-last-game-files.job.yml@main
uses: ./.github/workflows/fetch-game-files.job.yml

build-release:
name: Build & Release
Expand Down
Loading

0 comments on commit ae97983

Please sign in to comment.