Skip to content

Clean up JSON parsing code further, add JSON and STB license info to … #57

Clean up JSON parsing code further, add JSON and STB license info to …

Clean up JSON parsing code further, add JSON and STB license info to … #57

Workflow file for this run

name: "EnigmaFix Release Build"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.).
BUILD_TYPE: Release
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
# We need to update the submodules alongside updating the submodules for Kiero-CMake as an extra precaution.
- name: Initialize Submodules
run: git submodule update --init --recursive && cd Source/ThirdParty/Kiero-CMake && git submodule update --init --recursive && cd ../../..
# Afterwards, we run Nix-Build with our build type, and making sure to allow unsupported systems, for cross-compilation.
- name: Run Nix-Build
run: NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build --arg buildType '"${{env.BUILD_TYPE}}"'
# Before we wrap up, we need to remove any debug symbols from the directory.
- name: Prepare Windows Binaries
run: |
if [ "${{ env.BUILD_TYPE }}" == "Debug" ] || [ "${{ env.BUILD_TYPE }}" == "RelWithDebInfo" ]; then
cd result/Windows
rm *.a
fi
# Fetch the latest release URL dynamically using GitHub API
- name: Download and Extract Latest dinput8.dll from Ultimate ASI Loader
run: |
# Fetch the latest release tag info from GitHub API
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/ThirteenAG/Ultimate-ASI-Loader/releases/latest | jq -r '.assets[] | select(.name | test("Ultimate-ASI-Loader_x64.zip")) | .browser_download_url')
# Download the zip file of the latest release
curl -L $LATEST_RELEASE_URL -o Ultimate-ASI-Loader_x64.zip
# Unzip the downloaded file into a temporary directory
unzip Ultimate-ASI-Loader_x64.zip -d /tmp/asi-loader
# Move dinput8.dll to the desired result folder, no subfolder needed
sudo mv /tmp/asi-loader/dinput8.dll result/Windows/
# Clean up the downloaded zip and extracted files
rm -rf /tmp/asi-loader Ultimate-ASI-Loader_x64.zip
# Finally, upload the artifact.
- name: Upload Windows Binaries
uses: actions/upload-artifact@v4
with:
name: Enigmafix-Windows-Build-${{env.BUILD_TYPE}}
path: result/Windows