rpm_packages.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.event_name == 'pull_request'
  18. name: Test Packages
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v6
  22. with:
  23. fetch-depth: 0
  24. - name: Build RPM Package
  25. run: make rpm VERSION=2.2.x_dev
  26. - name: List generated files
  27. run: ls -l *.rpm
  28. build-package-manually:
  29. if: github.event_name == 'workflow_dispatch'
  30. name: Build Packages Manually
  31. runs-on: ubuntu-latest
  32. steps:
  33. - uses: actions/checkout@v6
  34. with:
  35. fetch-depth: 0
  36. - name: Build RPM Package
  37. run: make rpm
  38. - name: Upload package
  39. uses: actions/upload-artifact@v6
  40. with:
  41. name: packages
  42. path: "*.rpm"
  43. if-no-files-found: error
  44. retention-days: 3
  45. publish-package:
  46. if: github.event_name == 'push'
  47. name: Publish Packages
  48. runs-on: ubuntu-latest
  49. steps:
  50. - uses: actions/checkout@v6
  51. with:
  52. fetch-depth: 0
  53. - name: Build RPM Package
  54. run: make rpm
  55. - name: List generated files
  56. run: ls -l *.rpm
  57. - name: Upload package to repository
  58. env:
  59. FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
  60. run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done