dotnet-desktop.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: .NET Core Desktop
  2. on:
  3. push:
  4. paths:
  5. - 'Plain Craft Launcher 2.sln'
  6. - 'Plain Craft Launcher 2/**'
  7. - '.github/workflows/**'
  8. pull_request:
  9. paths:
  10. - 'Plain Craft Launcher 2.sln'
  11. - 'Plain Craft Launcher 2/**'
  12. - '.github/workflows/**'
  13. jobs:
  14. build:
  15. strategy:
  16. matrix:
  17. configuration: [Debug, Release]
  18. runs-on: windows-latest
  19. env:
  20. Solution_Name: Plain Craft Launcher 2.sln
  21. Wap_Project_Directory: Plain Craft Launcher 2
  22. Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj
  23. steps:
  24. - name: Checkout
  25. uses: actions/checkout@v4
  26. with:
  27. fetch-depth: 0
  28. # Install the .NET Core workload
  29. - name: Install .NET Core
  30. uses: actions/setup-dotnet@v4
  31. with:
  32. dotnet-version: 5
  33. # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
  34. - name: Setup MSBuild.exe
  35. uses: microsoft/setup-msbuild@v2
  36. # Restore the application to populate the obj folder with RuntimeIdentifiers
  37. - name: Restore the application
  38. run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
  39. env:
  40. Configuration: ${{ matrix.configuration }}
  41. # Create the app package by building and packaging the Windows Application Packaging project
  42. - name: Create the app package
  43. run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle
  44. env:
  45. Appx_Bundle: Always
  46. Appx_Bundle_Platforms: x86|x64
  47. Appx_Package_Build_Mode: StoreUpload
  48. Configuration: ${{ matrix.configuration }}
  49. # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
  50. - name: Upload build artifacts
  51. uses: actions/upload-artifact@v4
  52. with:
  53. name: ${{ matrix.configuration }}
  54. path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe