build.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: 构建 PCL
  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. workflow_dispatch:
  14. jobs:
  15. build:
  16. strategy:
  17. matrix:
  18. include:
  19. - name: 调试版
  20. configuration: Debug
  21. - name: 开发版
  22. configuration: Snapshot
  23. - name: 快照版
  24. configuration: Release
  25. - name: 更新快照版
  26. configuration: ReleaseUpdate
  27. - name: 正式版
  28. configuration: BETA
  29. runs-on: windows-latest
  30. env:
  31. Solution_Name: Plain Craft Launcher 2.sln
  32. Wap_Project_Directory: Plain Craft Launcher 2
  33. Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj
  34. Configuration: ${{ matrix.configuration }}
  35. Version_Friendly_Name: ${{ matrix.name }}
  36. steps:
  37. - name: 签出仓库
  38. uses: actions/checkout@v4
  39. with:
  40. fetch-depth: 0
  41. # setup msbuild
  42. - name: 安装 MSBuild
  43. uses: microsoft/setup-msbuild@v2
  44. # # Restore the application to populate the obj folder with RuntimeIdentifiers
  45. # - name: Restore the application
  46. # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
  47. # Create the app package by building and packaging the Windows Application Packaging project
  48. - name: 编译源代码
  49. run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild
  50. # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
  51. - name: 上传编译产物
  52. uses: actions/upload-artifact@v4
  53. with:
  54. name: ${{ env.Version_Friendly_Name }}
  55. path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe