Skip to content

SporeModManager: cleanup installed files when installation fails #87

SporeModManager: cleanup installed files when installation fails

SporeModManager: cleanup installed files when installation fails #87

Workflow file for this run

name: SporeModLoader
on: [push, pull_request]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Prepare Environment
run: |
$env:revision = git describe --tags --always
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
- name: Build SporeModLoader
run: |
msbuild "SporeModLoader" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Build SporeModManager
run: |
msbuild "SporeModManager" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Package SporeModLoader
run: |
New-Item -ItemType Directory -Force -Path bin\SporebinEP1
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\CoreLibs\disk
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\CoreLibs\march2017
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\ModLibs
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\SporeModManager
New-Item -ItemType File -Force -Path bin\SporeModLoader\ModLibs\.keep
Copy "3rdParty\Spore-ModAPI\dll\Release\SporeModAPI.disk.dll" "bin\SporeModLoader\CoreLibs\disk\SporeModAPI.dll"
Copy "3rdParty\Spore-ModAPI\dll\Release\SporeModAPI.march2017.dll" "bin\SporeModLoader\CoreLibs\march2017\SporeModAPI.dll"
Copy "3rdParty\Spore-ModAPI-legacy\SporeModAPI-disk.dll" "bin\SporeModLoader\CoreLibs\disk\SporeModAPI-disk.dll"
copy "3rdParty\Spore-ModAPI-legacy\SporeModAPI-steam_patched.dll" "bin\SporeModLoader\CoreLibs\march2017\SporeModAPI-steam_patched.dll"
Copy "SporeModLoader\Bin\Release\dinput8.dll" "bin\SporebinEP1\dinput8.dll"
Copy "SporeModManager\Bin\Release\SporeModManager.exe" "bin\SporeModLoader\SporeModManager\SporeModManager.exe"
- name: Upload SporeModLoader
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: bin/*
linux-build:
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Environment
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Download SporeModLoader
uses: actions/download-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: artifacts
- name: Build SporeModManager (Linux)
run: |
make -j$(nproc)
- name: Add SporeModManager (Linux) to SporeModLoader
run: |
cp bin/SporeModManager artifacts/SporeModLoader/SporeModManager/SporeModManager
- name: Upload SporeModLoader
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: artifacts/*