Repository navigation
79 lines (69 loc) · 2.05 KB
/
Copy pathbuild.yml
File metadata and controls
79 lines (69 loc) · 2.05 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build & Test
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
jobs:
asm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: Asm/build.sh
- name: Fail if committed .bin files are stale
run: git diff --exit-code -- Asm
test:
needs: asm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Run Tests & Generate Headless Screenshots
run: dotnet test MashedTrainer.sln -c Release --logger "console;verbosity=detailed"
- name: Upload Screenshots Artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: MashedTrainer-Screenshots
path: tests/bin/Release/net8.0/screenshots/
publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
# Variant 1: Tiny (Framework-dependent, ~3-5MB)
- name: Publish Tiny (Framework-Dependent)
run: >
dotnet publish MashedTrainer.csproj
-c Release
-r win-x86
--self-contained false
-o dist/tiny
# Variant 2: Standalone (Self-contained single executable, ~18MB)
- name: Publish Standalone (Self-Contained Single-File)
run: >
dotnet publish MashedTrainer.csproj
-c Release
-r win-x86
--self-contained true
-p:PublishSingleFile=true
-p:EnableCompressionInSingleFile=true
-o dist/standalone
- name: Upload Tiny Artifact
uses: actions/upload-artifact@v4
with:
name: MashedTrainer-Tiny-win-x86
path: dist/tiny/
- name: Upload Standalone Artifact
uses: actions/upload-artifact@v4
with:
name: MashedTrainer-Standalone-win-x86
path: dist/standalone/