release-cmake.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. name: Release
  2. on:
  3. push:
  4. tags:
  5. - boost-*
  6. jobs:
  7. release-posix-cmake:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v4
  11. with:
  12. path: ${{ github.ref_name }}
  13. submodules: true
  14. - name: Cleanup
  15. shell: bash
  16. run: |
  17. find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
  18. - name: Create archives
  19. run: |
  20. tar -czf ${{ github.ref_name }}-cmake.tar.gz ${{ github.ref_name }}
  21. sha256sum ${{ github.ref_name }}-cmake.tar.gz > ${{ github.ref_name }}-cmake.tar.gz.txt
  22. tar -cJf ${{ github.ref_name }}-cmake.tar.xz ${{ github.ref_name }}
  23. sha256sum ${{ github.ref_name }}-cmake.tar.xz > ${{ github.ref_name }}-cmake.tar.xz.txt
  24. - uses: softprops/action-gh-release@v2
  25. with:
  26. files: |
  27. ${{ github.ref_name }}-cmake.tar.gz
  28. ${{ github.ref_name }}-cmake.tar.gz.txt
  29. ${{ github.ref_name }}-cmake.tar.xz
  30. ${{ github.ref_name }}-cmake.tar.xz.txt
  31. release-windows-cmake:
  32. runs-on: windows-latest
  33. needs: release-posix-cmake
  34. steps:
  35. - uses: actions/checkout@v4
  36. with:
  37. path: ${{ github.ref_name }}
  38. submodules: true
  39. - name: Cleanup
  40. shell: bash
  41. run: |
  42. find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
  43. - name: Create archives
  44. shell: cmd
  45. run: |
  46. 7z a ${{ github.ref_name }}-cmake.zip ${{ github.ref_name }}
  47. sha256sum ${{ github.ref_name }}-cmake.zip > ${{ github.ref_name }}-cmake.zip.txt
  48. 7z a ${{ github.ref_name }}-cmake.7z ${{ github.ref_name }}
  49. sha256sum ${{ github.ref_name }}-cmake.7z > ${{ github.ref_name }}-cmake.7z.txt
  50. - uses: softprops/action-gh-release@v2
  51. with:
  52. files: |
  53. ${{ github.ref_name }}-cmake.zip
  54. ${{ github.ref_name }}-cmake.zip.txt
  55. ${{ github.ref_name }}-cmake.7z
  56. ${{ github.ref_name }}-cmake.7z.txt
  57. release-posix-b2-nodocs:
  58. runs-on: ubuntu-latest
  59. needs: release-windows-cmake
  60. steps:
  61. - uses: actions/checkout@v4
  62. with:
  63. path: ${{ github.ref_name }}
  64. submodules: true
  65. - name: Cleanup
  66. shell: bash
  67. run: |
  68. find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
  69. - name: Move headers, remove docs
  70. shell: bash
  71. run: |
  72. cd ${{ github.ref_name }}
  73. cp -r libs/*/include/boost libs/numeric/*/include/boost .
  74. rm -rf libs/*/include libs/numeric/*/include
  75. rm -rf libs/*/doc libs/numeric/*/doc
  76. rm -f CMakeLists.txt
  77. - name: Create archives
  78. run: |
  79. tar -czf ${{ github.ref_name }}-b2-nodocs.tar.gz ${{ github.ref_name }}
  80. sha256sum ${{ github.ref_name }}-b2-nodocs.tar.gz > ${{ github.ref_name }}-b2-nodocs.tar.gz.txt
  81. tar -cJf ${{ github.ref_name }}-b2-nodocs.tar.xz ${{ github.ref_name }}
  82. sha256sum ${{ github.ref_name }}-b2-nodocs.tar.xz > ${{ github.ref_name }}-b2-nodocs.tar.xz.txt
  83. - uses: softprops/action-gh-release@v2
  84. with:
  85. files: |
  86. ${{ github.ref_name }}-b2-nodocs.tar.gz
  87. ${{ github.ref_name }}-b2-nodocs.tar.gz.txt
  88. ${{ github.ref_name }}-b2-nodocs.tar.xz
  89. ${{ github.ref_name }}-b2-nodocs.tar.xz.txt
  90. release-windows-b2-nodocs:
  91. runs-on: windows-latest
  92. needs: release-posix-b2-nodocs
  93. steps:
  94. - uses: actions/checkout@v4
  95. with:
  96. path: ${{ github.ref_name }}
  97. submodules: true
  98. - name: Cleanup
  99. shell: bash
  100. run: |
  101. find ${{ github.ref_name }} -name ".git" -prune -exec rm -rf {} +
  102. - name: Move headers, remove docs
  103. shell: bash
  104. run: |
  105. cd ${{ github.ref_name }}
  106. cp -r libs/*/include/boost libs/numeric/*/include/boost .
  107. rm -rf libs/*/include libs/numeric/*/include
  108. rm -rf libs/*/doc libs/numeric/*/doc
  109. rm -f CMakeLists.txt
  110. - name: Create archives
  111. shell: cmd
  112. run: |
  113. 7z a ${{ github.ref_name }}-b2-nodocs.zip ${{ github.ref_name }}
  114. sha256sum ${{ github.ref_name }}-b2-nodocs.zip > ${{ github.ref_name }}-b2-nodocs.zip.txt
  115. 7z a ${{ github.ref_name }}-b2-nodocs.7z ${{ github.ref_name }}
  116. sha256sum ${{ github.ref_name }}-b2-nodocs.7z > ${{ github.ref_name }}-b2-nodocs.7z.txt
  117. - uses: softprops/action-gh-release@v2
  118. with:
  119. files: |
  120. ${{ github.ref_name }}-b2-nodocs.zip
  121. ${{ github.ref_name }}-b2-nodocs.zip.txt
  122. ${{ github.ref_name }}-b2-nodocs.7z
  123. ${{ github.ref_name }}-b2-nodocs.7z.txt
粤ICP备19079148号