msbuild.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: Release CI
  2. on: push
  3. jobs:
  4. x64_build:
  5. runs-on: windows-latest
  6. steps:
  7. - uses: actions/checkout@v4
  8. - name: Add msbuild to PATH
  9. uses: microsoft/setup-msbuild@v1
  10. - name: Run msbuild
  11. run: msbuild -p:configuration=release -p:platform=x64 -p:platformToolset=v142
  12. - name: Get current time
  13. uses: 1466587594/current-time@v1
  14. id: current-time
  15. with:
  16. format: YYYYMMDD_HHmmss
  17. utcOffset: "+08:00"
  18. - name : Upload artifact
  19. uses: actions/upload-artifact@v2
  20. with:
  21. name: x64_${{ steps.current-time.outputs.formattedTime }}_TrafficMonitor
  22. path: |
  23. Bin/x64/Release/TrafficMonitor.exe
  24. Bin/x64/Release/*.dll
  25. - name : Upload pdb files
  26. uses: actions/upload-artifact@v2
  27. with:
  28. name: x64_${{ steps.current-time.outputs.formattedTime }}_pdb
  29. path: Bin/x64/Release/*.pdb
  30. x86_build:
  31. runs-on: windows-latest
  32. steps:
  33. - uses: actions/checkout@v4
  34. - name: Add msbuild to PATH
  35. uses: microsoft/setup-msbuild@v1
  36. - name: Run msbuild
  37. run: msbuild -p:configuration=release -p:platform=x86 -p:platformToolset=v142
  38. - name: Get current time
  39. uses: 1466587594/current-time@v1
  40. id: current-time
  41. with:
  42. format: YYYYMMDD_HHmmss
  43. utcOffset: "+08:00"
  44. - name : Upload artifact
  45. uses: actions/upload-artifact@v2
  46. with:
  47. name: x86_${{ steps.current-time.outputs.formattedTime }}_TrafficMonitor
  48. path: |
  49. Bin/Release/TrafficMonitor.exe
  50. Bin/Release/*.dll
  51. - name : Upload pdb files
  52. uses: actions/upload-artifact@v2
  53. with:
  54. name: x86_${{ steps.current-time.outputs.formattedTime }}_pdb
  55. path: Bin/Release/*.pdb
  56. # winXP_build:
  57. # runs-on: windows-latest
  58. # steps:
  59. # - uses: actions/checkout@v4
  60. # - name: Add msbuild to PATH
  61. # uses: microsoft/setup-msbuild@v1
  62. # - name: Run msbuild
  63. # run: |
  64. # set ExternalCompilerOptions=/DCOMPILE_FOR_WINXP
  65. # msbuild -p:configuration=release -p:platform=x86 -p:platformToolset=v140_xp
  66. # shell: cmd
  67. # - name: Get current time
  68. # uses: 1466587594/current-time@v1
  69. # id: current-time
  70. # with:
  71. # format: YYYYMMDD_HHmmss
  72. # utcOffset: "+08:00"
  73. # - name : Upload artifact
  74. # uses: actions/upload-artifact@v1
  75. # with:
  76. # name: winXP_${{ steps.current-time.outputs.formattedTime }}_TrafficMonitor
  77. # path: Bin/Release/TrafficMonitor.exe