build.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: 构建 PCL
  2. on:
  3. push:
  4. paths:
  5. - 'Plain Craft Launcher 2.sln'
  6. - 'Plain Craft Launcher 2/**'
  7. - '.github/workflows/**'
  8. workflow_dispatch:
  9. jobs:
  10. build:
  11. strategy:
  12. matrix:
  13. include:
  14. - name: 调试版
  15. configuration: Debug
  16. - name: 开发版
  17. configuration: Snapshot
  18. - name: 快照版
  19. configuration: Release
  20. - name: 更新的快照版
  21. configuration: ReleaseUpdate
  22. - name: 正式版
  23. configuration: BETA
  24. runs-on: windows-latest
  25. env:
  26. Solution_Name: Plain Craft Launcher 2.sln
  27. Wap_Project_Directory: Plain Craft Launcher 2
  28. Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj
  29. Configuration: ${{ matrix.configuration }}
  30. Version_Friendly_Name: ${{ matrix.name }}
  31. steps:
  32. - name: 签出仓库
  33. uses: actions/checkout@v4
  34. with:
  35. fetch-depth: 0
  36. # setup msbuild
  37. - name: 安装 MSBuild
  38. uses: microsoft/setup-msbuild@v2
  39. # # Restore the application to populate the obj folder with RuntimeIdentifiers
  40. # - name: Restore the application
  41. # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
  42. # Create the app package by building and packaging the Windows Application Packaging project
  43. - name: 编译 PCL
  44. run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild
  45. # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle
  46. # env:
  47. # Appx_Bundle: Always
  48. # Appx_Bundle_Platforms: x86|x64|ARM|ARM64
  49. # Appx_Package_Build_Mode: StoreUpload
  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