rpm_packages.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: RPM Packages
  2. permissions: read-all
  3. on:
  4. workflow_dispatch:
  5. push:
  6. tags:
  7. - '[0-9]+.[0-9]+.[0-9]+'
  8. schedule:
  9. - cron: '0 0 * * 1,4' # Runs at 00:00 UTC on Monday and Thursday
  10. pull_request:
  11. branches: [ main ]
  12. paths:
  13. - 'packaging/rpm/**' # Only run on changes to the rpm packaging files
  14. - '.github/workflows/rpm_packages.yml'
  15. jobs:
  16. test-package:
  17. if: (github.event_name == 'schedule' && github.repository_owner == 'miniflux')
  18. || github.event_name == 'pull_request'
  19. name: Test Packages
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v6
  23. with:
  24. fetch-depth: 0
  25. - name: Build RPM Package
  26. run: make rpm VERSION=2.2.x_dev
  27. - name: List generated files
  28. run: ls -l *.rpm
  29. build-package-manually:
  30. if: github.event_name == 'workflow_dispatch'
  31. name: Build Packages Manually
  32. runs-on: ubuntu-latest
  33. steps:
  34. - uses: actions/checkout@v6
  35. with:
  36. fetch-depth: 0
  37. - name: Build RPM Package
  38. run: make rpm
  39. - name: Upload package
  40. uses: actions/upload-artifact@v7
  41. with:
  42. name: packages
  43. path: "*.rpm"
  44. if-no-files-found: error
  45. retention-days: 3
  46. publish-package:
  47. if: github.event_name == 'push' && github.repository_owner == 'miniflux'
  48. name: Publish Packages
  49. runs-on: ubuntu-latest
  50. steps:
  51. - uses: actions/checkout@v6
  52. with:
  53. fetch-depth: 0
  54. - name: Build RPM Package
  55. run: make rpm
  56. - name: List generated files
  57. run: ls -l *.rpm
  58. - name: Upload package to repository
  59. env:
  60. FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
  61. run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done