-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (44 loc) · 1.69 KB
/
build.yml
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
name: Mod Build
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Installer NuGet client
uses: nuget/setup-nuget@v1
- name: Setup tModLoader
uses: chi-rei-den/ModLoaderTools@v1.1
with:
command: setup
- name: Restore NuGet Packages
run: nuget restore Localizer.sln
- name: Build Mod
run: |
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" Localizer.sln /p:Configuration=Release /p:Platform=x86
- name: Patch Mod
run: '& "$ENV:GITHUB_WORKSPACE\ModPatch\bin\Release\net472\ModPatch.exe"'
- name: Publish Mod
if: github.ref == 'refs/heads/master'
uses: chi-rei-den/ModLoaderTools@v1
with:
command: publish
path: Localizer
env:
steamid64: ${{ secrets.steamid64 }}
passphrase: ${{ secrets.mod_browser_passphrase }}
- name: Clean artifact
run: |
mkdir .\Artifact\Artifact\
Copy-Item -Path "$ENV:UserProfile\Documents\My Games\Terraria\ModLoader\Mods\*" -Destination .\Artifact\Artifact
del .\Artifact\Artifact\enabled.json
- uses: actions/upload-artifact@master
with:
name: Build Artifact
path: Artifact
- name: Run Tests
run: |
copy .\LocalizerTest\bin\Release\net472\tModLoader.exe .\LocalizerTest\bin\Release\net472\Terraria.exe
& "$ENV:UserProfile\.nuget\packages\xunit.runner.console\2.4.1\tools\net472\xunit.console.x86.exe" ".\LocalizerTest\bin\Release\net472\LocalizerTest.dll"