build-release.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: Build Release
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. jobs:
  7. create-release:
  8. runs-on: 'ubuntu-latest'
  9. outputs:
  10. upload_url: ${{ steps.create-release.outputs.upload_url }}
  11. steps:
  12. - name: Create Release
  13. id: create-release
  14. uses: actions/create-release@v1
  15. env:
  16. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  17. with:
  18. tag_name: ${{ github.ref }}
  19. release_name: Release ${{ github.ref }}
  20. draft: false
  21. prerelease: true
  22. build:
  23. runs-on: ${{ matrix.os }}
  24. continue-on-error: ${{ matrix.experimental }}
  25. needs: create-release
  26. strategy:
  27. fail-fast: false
  28. matrix:
  29. os: [ubuntu-latest]
  30. platform:
  31. - 'linux-x64'
  32. - 'linuxmusl-x64'
  33. - 'linux-armv6'
  34. - 'linux-armv7'
  35. - 'linux-arm64v8'
  36. - 'win32-ia32'
  37. - 'win32-x64'
  38. - 'win32-arm64v8'
  39. experimental: [false]
  40. include:
  41. - os: macos-10.15
  42. platform: 'darwin-x64'
  43. experimental: true
  44. steps:
  45. - name: Checkout
  46. uses: actions/checkout@v2
  47. - name: Install dependencies (macOS)
  48. run: |
  49. pip3 install meson==0.55.3 ninja
  50. brew install advancecomp automake brotli nasm pkg-config
  51. if: matrix.platform == 'darwin-x64'
  52. - name: Build ${{ matrix.platform }}
  53. id: build-release
  54. run: |
  55. ./build.sh $(cat LIBVIPS_VERSION) ${{ matrix.platform }}
  56. echo "::set-output name=asset_file_name_gz::libvips-$(cat LIBVIPS_VERSION)-${{ matrix.platform }}.tar.gz"
  57. echo "::set-output name=asset_file_name_br::libvips-$(cat LIBVIPS_VERSION)-${{ matrix.platform }}.tar.br"
  58. - name: Upload Release Asset (.tar.gz)
  59. id: upload-release-asset-gz
  60. uses: actions/upload-release-asset@v1
  61. env:
  62. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  63. with:
  64. upload_url: ${{ needs.create-release.outputs.upload_url }}
  65. asset_path: ${{ steps.build-release.outputs.asset_file_name_gz }}
  66. asset_name: ${{ steps.build-release.outputs.asset_file_name_gz }}
  67. asset_content_type: application/gzip
  68. - name: Upload Release Asset (.tar.br)
  69. id: upload-release-asset-br
  70. uses: actions/upload-release-asset@v1
  71. env:
  72. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  73. with:
  74. upload_url: ${{ needs.create-release.outputs.upload_url }}
  75. asset_path: ${{ steps.build-release.outputs.asset_file_name_br }}
  76. asset_name: ${{ steps.build-release.outputs.asset_file_name_br }}
  77. asset_content_type: application/x-brotli