release-cmake.yml 4.7 KB

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