build.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle
  51. # env:
  52. # Appx_Bundle: Always
  53. # Appx_Bundle_Platforms: x86|x64|ARM|ARM64
  54. # Appx_Package_Build_Mode: StoreUpload
  55. # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
  56. - name: 上传编译产物
  57. uses: actions/upload-artifact@v4
  58. with:
  59. name: ${{ env.Version_Friendly_Name }}
  60. path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe