4
0

rpm_packages.yml 1.4 KB

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