Skip to content

Commit 1f2f65f

Browse files
committed
Update dotnet-desktop.yml
1 parent 2d30379 commit 1f2f65f

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/dotnet-desktop.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
env:
1818
Solution_Name: RAYTRACER_UNILIGHT.sln
1919
Project_Name: RAYTRACER_UNILIGHT.csproj
20-
CommonRepo_Url: https://github.com/danmunteanu/COMMON_GRAPHICS.git
21-
CommonSolution_Name: COMMON_GRAPHICS.sln
22-
CommonProject_Name: COMMON_GRAPHICS.csproj
2320

2421
steps:
2522
# Checkout main repository
@@ -48,33 +45,42 @@ jobs:
4845

4946
# Restore and build COMMON_GRAPHICS
5047
- name: Restore COMMON_GRAPHICS
51-
run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /t:Restore /p:Configuration=${{ matrix.configuration }}
48+
shell: pwsh
49+
run: msbuild "$PWD/COMMON_GRAPHICS/COMMON_GRAPHICS.sln" /t:Restore /p:Configuration=${{ matrix.configuration }}
5250

5351
- name: Build COMMON_GRAPHICS
54-
run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /p:Configuration=${{ matrix.configuration }}
52+
shell: pwsh
53+
run: msbuild "$PWD/COMMON_GRAPHICS/COMMON_GRAPHICS.sln" /p:Configuration=${{ matrix.configuration }}
5554

5655
# Copy the compiled DLL into the main project folder
5756
- name: Copy COMMON_GRAPHICS DLL
57+
shell: pwsh
5858
run: |
59-
mkdir -p RAYTRACER_UNILIGHT/libs
60-
copy COMMON_GRAPHICS/bin/${{ matrix.configuration }}/net8.0/COMMON_GRAPHICS.dll RAYTRACER_UNILIGHT/libs/
59+
$dllSource = "$PWD/COMMON_GRAPHICS/bin/${{ matrix.configuration }}/net8.0/COMMON_GRAPHICS.dll"
60+
$dllDestFolder = "$PWD/RAYTRACER_UNILIGHT/libs"
61+
if (!(Test-Path $dllDestFolder)) { New-Item -ItemType Directory -Path $dllDestFolder | Out-Null }
62+
Copy-Item $dllSource $dllDestFolder
6163
6264
# Restore main project packages
6365
- name: Restore RAYTRACER_UNILIGHT
64-
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=${{ matrix.configuration }}
66+
shell: pwsh
67+
run: msbuild "$PWD/$env:Solution_Name" /t:Restore /p:Configuration=${{ matrix.configuration }}
6568

6669
# Build main project
6770
- name: Build RAYTRACER_UNILIGHT
68-
run: msbuild $env:Solution_Name /p:Configuration=${{ matrix.configuration }}
71+
shell: pwsh
72+
run: msbuild "$PWD/$env:Solution_Name" /p:Configuration=${{ matrix.configuration }}
6973

7074
# Run tests (optional)
71-
#- name: Run tests
72-
# run: dotnet test $env:Solution_Name --configuration ${{ matrix.configuration }}
73-
# continue-on-error: true
75+
- name: Run tests
76+
shell: pwsh
77+
run: dotnet test "$PWD/$env:Solution_Name" --configuration ${{ matrix.configuration }}
78+
continue-on-error: true
7479

7580
# Publish main project
7681
- name: Publish RAYTRACER_UNILIGHT
77-
run: dotnet publish $env:Project_Name -c ${{ matrix.configuration }} -o publish
82+
shell: pwsh
83+
run: dotnet publish "$PWD/$env:Project_Name" -c ${{ matrix.configuration }} -o "$PWD/publish"
7884

7985
# Upload build artifacts
8086
- name: Upload build artifacts

0 commit comments

Comments
 (0)