build-pr.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: 构建来自 Pull Request 的 PCL
  2. on:
  3. pull_request:
  4. paths:
  5. - 'Plain Craft Launcher 2.sln'
  6. - 'Plain Craft Launcher 2/**'
  7. - '.github/workflows/**'
  8. jobs:
  9. build:
  10. strategy:
  11. matrix:
  12. configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate]
  13. runs-on: windows-latest
  14. env:
  15. Solution_Name: Plain Craft Launcher 2.sln
  16. Wap_Project_Directory: Plain Craft Launcher 2
  17. Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj
  18. Configuration: ${{ matrix.configuration }}
  19. steps:
  20. - name: 签出仓库
  21. uses: actions/checkout@v4
  22. with:
  23. fetch-depth: 0
  24. # setup msbuild
  25. - name: 安装 MSBuild
  26. uses: microsoft/setup-msbuild@v2
  27. # # Restore the application to populate the obj folder with RuntimeIdentifiers
  28. # - name: Restore the application
  29. # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
  30. # Create the app package by building and packaging the Windows Application Packaging project
  31. - name: 编译 PCL
  32. run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild
  33. # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
  34. - name: 上传编译产物
  35. uses: actions/upload-artifact@v4
  36. with:
  37. name: ${{ env.Configuration }}
  38. path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe