rpm_packages.yml 1.6 KB

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