-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (57 loc) · 2.33 KB
/
build.yml
File metadata and controls
66 lines (57 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: modapi-launcher-kit
on: [push, pull_request]
jobs:
build:
runs-on: windows-2022
env:
nugetUrl: 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
modApiUrl: 'https://github.com/emd4600/Spore-ModAPI/releases/latest/download/SporeModAPIdlls.zip'
legacyModApiUrl: 'https://github.com/emd4600/Spore-ModAPI/releases/latest/download/SporeModAPIlegacydlls.zip'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Install Nuget
run: |
Invoke-WebRequest "${env:nugetUrl}" -OutFile nuget.exe
- name: Prepare Environment
run: |
$env:revision = git describe --tags --always
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
- name: Restore Packages
run: |
nuget restore
- name: Download Spore-ModAPI
run: |
Invoke-WebRequest "${env:modApiUrl}" -OutFile SporeModAPIdlls.zip
Invoke-WebRequest "${env:legacyModApiUrl}" -OutFile SporeModAPIlegacydlls.zip
- name: Build modapi-launcher-kit
run: |
msbuild /p:Configuration=Release /m
- name: Package ModApiUpdate.zip
run: |
& "C:\Program Files\7-Zip\7z.exe" e -y SporeModAPIdlls.zip -oOutput\coreLibs
& "C:\Program Files\7-Zip\7z.exe" e -y SporeModAPIlegacydlls.zip -oOutput\
cd Output
& "C:\Program Files\7-Zip\7z" a -tzip "..\ModApiUpdate.zip" *
- name: Build ModApi.InterimSetup
run: |
Copy -Force ModApiUpdate.zip ModApi.InterimSetup\ModApi.InterimSetup\Resources\ModApiUpdate.zip
msbuild ModApi.InterimSetup /p:Configuration=Release
- name: Build ModApi.Updater
run: |
Copy -Force ModApiUpdate.zip Updater\ModApi.Updater\Resources\ModApiUpdate.zip
msbuild Updater /p:Configuration=Release
- name: Upload ModApi.InterimSetup
uses: actions/upload-artifact@v4
with:
name: ModApi.InterimSetup-${{ env.GIT_REVISION }}
path: ModApi.InterimSetup/ModApi.InterimSetup/bin/Release/*.exe
- name: Upload ModApi.Updater
uses: actions/upload-artifact@v4
with:
name: ModApi.Updater-${{ env.GIT_REVISION }}
path: Updater/ModApi.Updater/bin/Release/*.exe