build.yml Enhancements (#476)

* update build.yml to build both ehr.dll and cta.exe, plus can now be run manually

* retention days 1

* too detailed comments
This commit is contained in:
Jamesssssssssssssss authored and GitHub committed 2026-01-19 20:14:18 +01:00
1 parent e9f3e02248
commit c28bf626f6
1 file changed
+62 -19
+62 -19
View File
@@ -3,31 +3,74 @@ name: Build
on: on:
pull_request: pull_request:
branches: [ main ] branches: [ main ]
workflow_dispatch:
jobs: jobs:
build: # ---------------------------------------------------------
if: github.head_ref != 'translation' # 1) Build EHR
# ---------------------------------------------------------
build-ehr:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 8.0.x dotnet-version: 6.0.x
- name: Cache NuGet packages - name: Build EHR
uses: actions/cache@v3 run: dotnet build EHR.csproj -c Release -o build/
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies - name: Upload EHR artifact
run: dotnet restore uses: actions/upload-artifact@v4
with:
name: ehr
path: build/EHR.dll
retention-days: 1
- name: Build # ---------------------------------------------------------
run: dotnet build --configuration Release --no-restore # 2) Build Control Panel
# ---------------------------------------------------------
build-control-panel:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Restore .NET packages
run: dotnet restore -p:SelfContained=true CTA/CustomTeamAssigner/CustomTeamAssigner.csproj
- name: Build Control Panel (MSBuild)
run: |
msbuild CTA/CustomTeamAssigner/CustomTeamAssigner.csproj `
/p:Configuration=Release `
/p:Platform="x64" `
/p:PublishSingleFile=true `
/p:SelfContained=true `
/p:RuntimeIdentifier=win-x64 `
/p:IncludeAllContentForSelfExtract=true `
/p:DebugType=None `
/p:PublishDir=build\ `
/t:publish
- name: Rename exe file
run: |
mkdir build/
mv CTA/CustomTeamAssigner/build/CustomTeamAssigner.exe build/EHR_Control-Panel_BETA.exe
- name: Upload Control Panel artifact
uses: actions/upload-artifact@v4
with:
name: control-panel
path: build/EHR_Control-Panel_BETA.exe
retention-days: 1