77 branches : [ "main" ]
88
99jobs :
10-
1110 build :
12-
1311 strategy :
1412 matrix :
1513 configuration : [Release]
16- runs-on : windows-latest
14+ os : [windows-latest, macos-latest]
15+ include :
16+ - os : windows-latest
17+ platform : win-x64
18+ - os : macos-latest
19+ platform : osx-arm64
20+
21+ runs-on : ${{ matrix.os }}
1722
1823 env :
1924 Solution_Name : vector-editor.sln # Actual solution name
@@ -28,20 +33,37 @@ jobs:
2833 - name : Install .NET Core
2934 uses : actions/setup-dotnet@v4
3035 with :
31- dotnet-version : 8 .0.x
36+ dotnet-version : 9 .0.x
3237
33- # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
38+ # Add MSBuild to the PATH (Windows only)
3439 - name : Setup MSBuild.exe
3540 uses : microsoft/setup-msbuild@v2
41+ if : matrix.os == 'windows-latest'
3642
3743 # Build the application
3844 - name : Build the application
39- run : dotnet build $env:Solution_Name --configuration $env:Configuration
40- env :
41- Configuration : ${{ matrix.configuration }}
45+ shell : bash
46+ run : |
47+ if [ "${{ matrix.os }}" == "windows-latest" ]; then
48+ dotnet build $Solution_Name --configuration ${{ matrix.configuration }}
49+ else
50+ dotnet build $Solution_Name --configuration ${{ matrix.configuration }}
51+ fi
52+
53+ # Publish the application for specific runtime
54+ - name : Publish the application
55+ shell : bash
56+ run : |
57+ dotnet publish $Solution_Name \
58+ --configuration ${{ matrix.configuration }} \
59+ --runtime ${{ matrix.platform }} \
60+ --self-contained true \
61+ -p:PublishSingleFile=true \
62+ -p:PublishTrimmed=true \
63+ -o publish/${{ matrix.platform }}
4264
4365 - name : Upload build artifacts
4466 uses : actions/upload-artifact@v4
4567 with :
46- name : Build Output
47- path : bin /${{ matrix.configuration }}
68+ name : vector-editor-${{ matrix.platform }}
69+ path : publish /${{ matrix.platform }}
0 commit comments