-
-
Notifications
You must be signed in to change notification settings - Fork 23
69 lines (57 loc) · 1.97 KB
/
build.yaml
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
65
66
67
68
69
# Usage:
#
# Build:
# uses: "./.github/workflows/build"
# with:
# build_type: Debug
#
#
name: Build
on:
workflow_call:
inputs:
build_type:
description: 'Build type to pass to `dotnet`, should be either "Debug" or "Release"'
required: false
default: "Debug"
type: string
outputs:
schemas_changed:
description: "Have the schemas been updated?"
value: ${{ jobs.Build.outputs.schemas_changed }}
jobs:
Build:
runs-on: windows-latest
outputs:
schemas_changed: ${{ steps.changed_files.outputs.files_changed }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
# Disable Strong Name Verification to let us pull a switch-a-roo
- name: Disable strong name validation
run: "C:\\\"Program Files (x86)\"\\\"Microsoft SDKs\"\\Windows\\v10.0A\\bin\\\"NETFX 4.8 Tools\"\\x64\\sn.exe -Vr *"
- name: Remove .csproj.user
run: "rm .\\NewHorizons\\NewHorizons.csproj.user"
- name: Build Project
run: dotnet build -c ${{ inputs.build_type }}
- name: Generate Schemas
run: .\SchemaExporter\bin\${{ inputs.build_type }}\SchemaExporter.exe
- name: Delete XML documentation
run: rm .\NewHorizons\bin\${{ inputs.build_type }}\NewHorizons.xml
- name: Upload Mod Artifact
uses: actions/upload-artifact@v4
with:
name: xen.NewHorizons.${{ inputs.build_type }}
path: .\NewHorizons\bin\${{ inputs.build_type }}
- name: Upload Schemas Artifact
uses: actions/upload-artifact@v4
with:
name: NewHorizons-Schemas-${{ inputs.build_type }}
path: .\NewHorizons\Schemas
- name: Verify Changed Schemas
uses: tj-actions/verify-changed-files@v20
id: changed_files
with:
files: NewHorizons/Schemas/**