debian_packages.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Debian Packages
  2. permissions: read-all
  3. on:
  4. workflow_dispatch:
  5. push:
  6. tags:
  7. - '[0-9]+.[0-9]+.[0-9]+'
  8. pull_request:
  9. branches: [ main ]
  10. jobs:
  11. test-packages:
  12. if: github.event.pull_request
  13. name: Test Packages
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@v4
  17. with:
  18. fetch-depth: 0
  19. - name: Set up QEMU
  20. uses: docker/setup-qemu-action@v3
  21. - name: Set up Docker Buildx
  22. uses: docker/setup-buildx-action@v3
  23. id: buildx
  24. with:
  25. install: true
  26. - name: Available Docker Platforms
  27. run: echo ${{ steps.buildx.outputs.platforms }}
  28. - name: Build Debian Packages
  29. run: make debian-packages
  30. - name: List generated files
  31. run: ls -l *.deb
  32. build-packages-manually:
  33. if: github.event_name != 'pull_request' && github.event_name != 'push'
  34. name: Build Packages Manually
  35. runs-on: ubuntu-latest
  36. steps:
  37. - uses: actions/checkout@v4
  38. with:
  39. fetch-depth: 0
  40. - name: Set up QEMU
  41. uses: docker/setup-qemu-action@v3
  42. - name: Set up Docker Buildx
  43. uses: docker/setup-buildx-action@v3
  44. id: buildx
  45. with:
  46. install: true
  47. - name: Available Docker Platforms
  48. run: echo ${{ steps.buildx.outputs.platforms }}
  49. - name: Build Debian Packages
  50. run: make debian-packages
  51. - name: Upload package
  52. uses: actions/upload-artifact@v4
  53. with:
  54. name: packages
  55. path: "*.deb"
  56. if-no-files-found: error
  57. retention-days: 3
  58. publish-packages:
  59. if: github.event_name == 'push'
  60. name: Publish Packages
  61. runs-on: ubuntu-latest
  62. steps:
  63. - uses: actions/checkout@v4
  64. with:
  65. fetch-depth: 0
  66. - name: Set up QEMU
  67. uses: docker/setup-qemu-action@v3
  68. - name: Set up Docker Buildx
  69. uses: docker/setup-buildx-action@v3
  70. id: buildx
  71. with:
  72. install: true
  73. - name: Available Docker Platforms
  74. run: echo ${{ steps.buildx.outputs.platforms }}
  75. - name: Build Debian Packages
  76. run: make debian-packages
  77. - name: List generated files
  78. run: ls -l *.deb
  79. - name: Upload packages to repository
  80. env:
  81. FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
  82. run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done